Use css variables.

This commit is contained in:
Mike Cao committed 2020-08-05 19:04:02 -07:00
1 parent 5d4ff5cfa4
commit a5930f1772
29 files changed
+131 -85

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ export default function StickyHeader({
ref={ref}
data-sticky={sticky}
className={classNames(className, { [stickyClassName]: sticky })}
{...(sticky && { style: stickyStyle })}
style={sticky ? { ...stickyStyle, width: ref?.current?.clientWidth } : null}
>
{children}
</div>