Last active
August 8, 2023 16:31
-
-
Save lancejpollard/f51dbfac2f4460addd29070db7b23c9f to your computer and use it in GitHub Desktop.
Example CSS Utilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.every-2n-child-background-fill-white-2:nth-child(2n) > * { | |
background: rgb(244, 244, 244); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function TableScroller({ | |
children, | |
borderless = false, | |
}: TableScrollerProps) { | |
const list = [ | |
C.borderNone, | |
C.marginBottom32, | |
C.marginTop16, | |
C.heightMax100Vh, | |
C.widthMax720, | |
C.width100P, | |
C.scrollX, | |
C.stickyTableHeader, | |
] | |
if (!borderless) { | |
list.push( | |
C.borderBottomWidth4, | |
C.borderBottomSolid, | |
C.borderColorWhite4, | |
) | |
} | |
return <div className={list.join(' ')}>{children}</div> | |
} | |
function TR({ children }: TRProps) { | |
const list = [C.height100P, C.every2NChildBackgroundFillWhite2] | |
return <tr className={list.join(' ')}>{children}</tr> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment