Skip to content

Commit ab2392d

Browse files
replace adding border with bow shadow to keep visual effect (blue bar at the end of selected row) with causing a misalgnement between rows (shift of cell to the right due to border size)
Remove unnecesary padding to head row to realign with table rows
1 parent 1b32903 commit ab2392d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/lib/components/tablev2/Tablestyle.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { HeaderGroup } from 'react-table';
88
import { Icon } from '../icon/Icon.component';
99
import { FocusVisibleStyle } from '../buttonv2/Buttonv2.component';
1010
import { spacing } from '../../spacing';
11-
import { Box } from '../box/Box';
11+
import { Box } from '../box/Box'
1212

1313
const borderSize = '4px';
1414
export const SortIncentive = styled.span`
@@ -65,7 +65,6 @@ export const HeadRow = styled.div<HeadRowType>`
6565
overflow: hidden;
6666
border-bottom: 1px solid
6767
${(props) => props.theme[props.separationLineVariant]};
68-
padding-right: ${borderSize};
6968
padding-left: ${spacing.r16};
7069
`;
7170

@@ -105,7 +104,7 @@ export const TableRow = styled.div<TableRowType>`
105104
if (props.selectedId && props.isSelected) {
106105
return css`
107106
background-color: ${props.theme.highlight};
108-
border-right: ${borderSize} solid ${props.theme.selectedActive};
107+
box-shadow: inset -${borderSize} 0 0 ${props.theme.selectedActive};
109108
`;
110109
}
111110
}}
@@ -124,7 +123,7 @@ export const TableRowMultiSelectable = styled.div<TableRowMultiSelectableType>`
124123
if (props.isSelected) {
125124
return css`
126125
background-color: ${(props) => props.theme.highlight};
127-
border-right: ${borderSize} solid ${props.theme.selectedActive};
126+
box-shadow: inset -${borderSize} 0 0 ${props.theme.selectedActive};
128127
`;
129128
}
130129
}}

0 commit comments

Comments
 (0)