Skip to content

Commit

Permalink
fix: update active color of resize handle
Browse files Browse the repository at this point in the history
  • Loading branch information
jordankoschei-okta committed Jul 25, 2024
1 parent 6ee0a40 commit 66710eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion packages/odyssey-react-mui/src/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,9 @@ const DataTable = ({
muiTableProps: {
ref: tableContentRef,
className:
!shouldDisplayRowActions && hasColumnResizing ? "remove-last-row" : "",
!shouldDisplayRowActions && hasColumnResizing
? "ods-hide-spacer-column"
: "",
},

muiTableContainerProps: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ const TableContent = ({
ref: tableContentRef,
className:
!shouldDisplayRowActions && tableOptions.hasColumnResizing
? "remove-last-row"
? "ods-hide-spacer-column"
: "",
},
muiTableContainerProps: {
Expand Down
9 changes: 7 additions & 2 deletions packages/odyssey-react-mui/src/theme/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2622,12 +2622,12 @@ export const components = ({
},

// TEST OF RESIZING
[`.remove-last-row .${tableHeadClasses.root} &:last-of-type, .remove-last-row .${tableBodyClasses.root} &:last-of-type`]:
[`.ods-hide-spacer-column .${tableHeadClasses.root} &:last-of-type, .ods-hide-spacer-column .${tableBodyClasses.root} &:last-of-type`]:
{
display: "none",
},

[`.remove-last-row .${tableHeadClasses.root} &:nth-last-of-type(2), .remove-last-row .${tableBodyClasses.root} &:nth-last-of-type(2)`]:
[`.ods-hide-spacer-column .${tableHeadClasses.root} &:nth-last-of-type(2), .ods-hide-spacer-column .${tableBodyClasses.root} &:nth-last-of-type(2)`]:
{
borderTopRightRadius: odysseyTokens.Spacing2,
borderBottomRightRadius: odysseyTokens.Spacing2,
Expand Down Expand Up @@ -2680,6 +2680,11 @@ export const components = ({

[`& .Mui-TableHeadCell-ResizeHandle-Wrapper`]: {
marginInlineEnd: `-${odysseyTokens.Spacing3}`,

[`&:active .${dividerClasses.vertical}`]: {
borderColor: odysseyTokens.HueNeutral400,
opacity: 1,
},
},

[`& .Mui-TableHeadCell-Content-Wrapper`]: {
Expand Down

0 comments on commit 66710eb

Please sign in to comment.