Skip to content

Commit

Permalink
fix missing border in container el
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciaran Schutte committed Jan 16, 2024
1 parent beec11d commit 7a2dcb6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ export const Table = <TData extends object>({

return (
<TableContainer className={className}>
<TableContainerInner withFilters={withFilters} withTabs={withTabs}>
<TableContainerInner
withFilters={withFilters}
withTabs={withTabs}
withSideBorders={withSideBorders}
>
<TableStyled withSideBorders={withSideBorders}>
{withHeaders && (
<TableHead>
Expand Down
8 changes: 7 additions & 1 deletion src/Table/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,20 @@ export const TableContainer = styled(TableContainerComp, {
`;

const TableContainerInnerComp = (
props: React.PropsWithChildren<{ className?: string; withFilters?: boolean; withTabs?: boolean }>,
props: React.PropsWithChildren<{
className?: string;
withFilters?: boolean;
withTabs?: boolean;
withSideBorders?: boolean;
}>,
) => <div {...props} className={clsx(TABLE_CLASSES.TABLE_CONTAINER_INNER, props.className)} />;
export const TableContainerInner = styled(TableContainerInnerComp, {
shouldForwardProp: (prop) => isPropValid(prop),
})`
width: 100%;
max-width: 100%;
overflow-x: auto;
${(props) => props.withSideBorders && `border-right: 1px solid ${colors.grey_2}`};
${(props) =>
props.withFilters &&
`
Expand Down

0 comments on commit 7a2dcb6

Please sign in to comment.