Commit 610acb01 authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

fix: font family overrides (#3485)

parent 63bad8f8
...@@ -40,10 +40,10 @@ const WidgetWrapper = styled.div<{ width?: number | string }>` ...@@ -40,10 +40,10 @@ const WidgetWrapper = styled.div<{ width?: number | string }>`
* { * {
box-sizing: border-box; box-sizing: border-box;
font-family: ${({ theme }) => theme.fontFamily}; font-family: ${({ theme }) => (typeof theme.fontFamily === 'string' ? theme.fontFamily : theme.fontFamily.font)};
@supports (font-variation-settings: normal) { @supports (font-variation-settings: normal) {
font-family: ${({ theme }) => theme.fontFamilyVariable}; font-family: ${({ theme }) => (typeof theme.fontFamily === 'string' ? undefined : theme.fontFamily.variable)};
} }
} }
` `
......
...@@ -73,8 +73,10 @@ export const darkTheme: Colors = { ...@@ -73,8 +73,10 @@ export const darkTheme: Colors = {
export const defaultTheme = { export const defaultTheme = {
borderRadius: 1, borderRadius: 1,
fontFamily: '"Inter", sans-serif', fontFamily: {
fontFamilyVariable: '"InterVariable", sans-serif', font: '"Inter", sans-serif',
variable: '"InterVariable", sans-serif',
},
fontFamilyCode: 'IBM Plex Mono', fontFamilyCode: 'IBM Plex Mono',
tokenColorExtraction: false, tokenColorExtraction: false,
...lightTheme, ...lightTheme,
......
...@@ -27,8 +27,12 @@ export type Color = keyof Colors ...@@ -27,8 +27,12 @@ export type Color = keyof Colors
export interface Attributes { export interface Attributes {
borderRadius: boolean | number borderRadius: boolean | number
fontFamily: string fontFamily:
fontFamilyVariable: string | string
| {
font: string
variable: string
}
fontFamilyCode: string fontFamilyCode: string
tokenColorExtraction: boolean tokenColorExtraction: boolean
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment