Skip to content

Commit

Permalink
chore: update style type , added isDisbaled and fix double background…
Browse files Browse the repository at this point in the history
… color in hover actions
  • Loading branch information
tewarig committed Jan 28, 2025
1 parent cec9480 commit e80de07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/blade/src/components/Table/TableBody.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ const StyledRow = styled(Row)<{
borderRightColor: getIn(theme.colors, tableRow.borderColor),
}
: undefined,
[`& td:last-child .cell-wrapper`]: {
'& td:last-child .cell-wrapper': {
borderRight: 'none',
},
...(hasHoverActions
? {
[`@media ${getMediaQuery({ min: theme.breakpoints.m })}`]: {
[`& td:last-child`]: {
'& td:last-child': {
opacity: 0,
position: 'sticky',
zIndex: 2,
Expand All @@ -238,7 +238,7 @@ const StyledRow = styled(Row)<{
overflow: 'visible',
},
},
[`& td:last-child:focus-within`]: {
'& td:last-child:focus-within': {
opacity: 1,
...getTableActionsHoverStyles({
theme,
Expand Down Expand Up @@ -277,11 +277,6 @@ const StyledRow = styled(Row)<{
transition: rowBackgroundTransition,
backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorActive),
cursor: 'pointer',
...getTableActionsHoverStyles({
hoverColor: tableRow.nonStripe.backgroundColorActive,
backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,
theme,
}),
},
}),
'&:focus': getFocusRingStyles({ theme, negativeOffset: true }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const TableTemplate: StoryFn<typeof TableComponent> = ({ ...args }) => {
<TableRow
key={index}
item={tableItem}
isDisabled={index === 3}
hoverActions={
<>
<IconButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const TableTemplate: StoryFn<typeof TableComponent> = ({ ...args }) => {
<TableRow
key={index}
item={tableItem}
isDisabled={index === 3}
hoverActions={
<>
<IconButton
Expand Down

0 comments on commit e80de07

Please sign in to comment.