mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-11-23 11:46:08 -05:00
fix font css vars
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import hash from "@emotion/hash";
|
||||
|
||||
// a little hacky-hack to have react combine all of these css var declarations into a single <style> tag up top. see:
|
||||
// https://react.dev/reference/react-dom/components/style#rendering-an-inline-css-stylesheet
|
||||
export const setRootCssVariables = (vars: Record<string, string>) => {
|
||||
const root = Object.entries(vars)
|
||||
.map(([key, value]) => `--${key}:${value}`)
|
||||
.join(";");
|
||||
|
||||
return {
|
||||
href: hash(root),
|
||||
dangerouslySetInnerHTML: { __html: `:root{${root}}` },
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user