Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/table-component' into feat/…
Browse files Browse the repository at this point in the history
…table-component-documentation
  • Loading branch information
chaitanyadeorukhkar committed Nov 23, 2023
2 parents c7ca22f + 989ee09 commit 8ba922b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/blade/src/components/Table/TableHeader.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,17 @@ const SortButton = styled.button(({ theme }) => ({
const SortIcon = ({
isSorted,
isSortReversed,
onClick,
}: {
isSorted: boolean;
isSortReversed: boolean;
onClick: () => void;
}): React.ReactElement => {
const { theme } = useTheme();
const defaultColor = getIn(theme.colors, 'surface.action.icon.default.lowContrast');
const activeColor = getIn(theme.colors, 'brand.primary.500');
const upArrowColor = isSorted && isSortReversed ? activeColor : defaultColor;
const downArrowColor = isSorted && !isSortReversed ? activeColor : defaultColor;
return (
<SortButton {...makeAccessible({ label: 'Toggle Sort', role: 'button' })} onClick={onClick}>
<SortButton {...makeAccessible({ label: 'Toggle Sort', role: 'button' })}>
<svg width={20} height={20} fill="none">
<path
fill={upArrowColor}
Expand Down Expand Up @@ -170,7 +168,6 @@ const _TableHeaderCell = ({ children, headerKey }: TableHeaderCellProps): React.
<SortIcon
isSorted={currentSortedState.sortKey === headerKey}
isSortReversed={currentSortedState.isSortReversed}
onClick={() => headerKey && toggleSort(headerKey)}
/>
</BaseBox>
)}
Expand Down

0 comments on commit 8ba922b

Please sign in to comment.