feat: add column resizing (#975)

* feat: add column resizing

Closes #817

* Use mouse up and down instead of dragging

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Thaïs
2023-07-31 05:38:38 +02:00
committed by GitHub
parent ade5e52e55
commit 58e5d24261
3 changed files with 126 additions and 14 deletions

View File

@ -14,6 +14,7 @@ const StyledTitle = styled.div`
gap: ${({ theme }) => theme.spacing(1)};
height: ${({ theme }) => theme.spacing(8)};
padding-left: ${({ theme }) => theme.spacing(2)};
padding-right: ${({ theme }) => theme.spacing(2)};
`;
const StyledIcon = styled.div`
@ -25,11 +26,17 @@ const StyledIcon = styled.div`
}
`;
const StyledText = styled.span`
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
`;
export function ColumnHead({ viewName, viewIcon }: OwnProps) {
return (
<StyledTitle>
<StyledIcon>{viewIcon}</StyledIcon>
{viewName}
<StyledText>{viewName}</StyledText>
</StyledTitle>
);
}