Skip to content

Using vars with additional strings for staticProperties #126

Answered by richbachman
richbachman asked this question in Q&A
Discussion options

You must be logged in to vote

I wasn't thinking straight when I asked this question. The right move is to just add any global styles to the object that you're including in vars.

const globalFontFamilyStyles = {
  inherit: "inherit",
};

const combinedFontFamilies: typeof fontFamilies & {
  inherit: string;
} = {
  ...fontFamilies,
  ...globalFontFamilyStyles,
};

export const [defaultTheme, vars] = createTheme({
  fontFamily: combinedFontFamilies,
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by roginfarrer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant