Skip to content

Commit

Permalink
update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenjwatkins committed Aug 31, 2023
1 parent 265bbe5 commit cf40878
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
28 changes: 17 additions & 11 deletions easy-ui-react/src/DataGrid/ColumnHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,23 @@ export function ColumnHeader({ column, state }: ColumnHeaderProps) {
data-col-span={column.colspan}
>
{column.rendered}
{column.props.allowsSorting &&
state.sortDescriptor?.column === column.key && (
<span aria-hidden="true" className={styles.sortIcon}>
{state.sortDescriptor?.column === column.key &&
state.sortDescriptor?.direction === "ascending" ? (
<Up />
) : (
<Down />
)}
</span>
)}
{column.props.allowsSorting && (
<span
aria-hidden="true"
className={classNames(
styles.sortIcon,
state.sortDescriptor?.column === column.key &&
styles.sortIconIsSorted,
)}
>
{state.sortDescriptor?.column === column.key &&
state.sortDescriptor?.direction === "ascending" ? (
<Up />
) : (
<Down />
)}
</span>
)}
</div>
);
}
Expand Down
6 changes: 4 additions & 2 deletions easy-ui-react/src/DataGrid/DataGrid.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
color: design-token("color.gray.500");
}

.sortIconIsSorted {
color: design-token("color.white");
}

.row {
display: contents;
}
Expand Down Expand Up @@ -147,13 +151,11 @@
.cell {
background: design-token("color.gray.050");
color: design-token("color.blue.700");
font-weight: 500;
}
}

.rowExpanded {
.cell {
font-weight: 600;
margin-bottom: component-token("data-grid", "expanded-row-height");
}
}
Expand Down

0 comments on commit cf40878

Please sign in to comment.