Skip to content

Instantly share code, notes, and snippets.

@lancejpollard
Last active August 8, 2023 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lancejpollard/f51dbfac2f4460addd29070db7b23c9f to your computer and use it in GitHub Desktop.
Save lancejpollard/f51dbfac2f4460addd29070db7b23c9f to your computer and use it in GitHub Desktop.
Example CSS Utilities
.every-2n-child-background-fill-white-2:nth-child(2n) > * {
background: rgb(244, 244, 244);
}
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