Skip to content

Commit

Permalink
feat: Made table headings sticky (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
chavda-bhavik authored Nov 10, 2022
1 parent 9679978 commit 3c60cc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/widget/src/config/colors.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export const colors = {
lightDanger: '#FDEBEB',
light: '#F2F9FE',
white: '#FFFFFF',
gray: '#ebebeb',
};
6 changes: 6 additions & 0 deletions apps/widget/src/design-system/Table/Table.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ export const getTableStyles = (theme: MantineTheme) => ({
overflow: 'auto',
display: 'block',
whiteSpace: 'nowrap',
'thead tr th': {
position: 'sticky',
top: 0,
'z-index': 1,
background: colors.gray,
},
});

export const getHeadingStyles = (theme: MantineTheme): React.CSSProperties => ({
Expand Down

0 comments on commit 3c60cc7

Please sign in to comment.