From 6205ba69d874e6224b4277d41965c7ad0afdbd9c Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 21 Nov 2022 21:06:08 -0700 Subject: [PATCH] move text styles out of Code.tsx into textStyles --- src/components/UI/docs/Code.tsx | 16 ++++------------ src/theme/foundations/textStyles.ts | 14 ++++++++++++++ src/theme/index.ts | 3 ++- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/components/UI/docs/Code.tsx b/src/components/UI/docs/Code.tsx index 181dba1eeb..7be53c6ac6 100644 --- a/src/components/UI/docs/Code.tsx +++ b/src/components/UI/docs/Code.tsx @@ -13,11 +13,7 @@ export const Code: FC = ({ code }) => { @@ -28,15 +24,11 @@ export const Code: FC = ({ code }) => { ( {code.children[0]} diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index b259d4ae0a..720ef0f97f 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -90,6 +90,20 @@ export const textStyles = { textAlign: 'center', fontSize: 'sm' }, + 'inline-code-snippet': { + fontFamily: '"JetBrains Mono", monospace', + fontWeight: 400, + fontSize: 'md', + lineHeight: 4, + letterSpacing: '1%' + }, + 'code-block': { + fontFamily: '"JetBrains Mono", monospace', + fontWeight: 400, + fontSize: 'md', + lineHeight: '21.12px', + letterSpacing: '1%' + }, // TODO: refactor w/ semantic tokens for light/dark mode 'link-light': {}, // TODO: refactor w/ semantic tokens for light/dark mode diff --git a/src/theme/index.ts b/src/theme/index.ts index ff6c89914e..126e85e865 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -29,7 +29,8 @@ const overrides = { body: { _light: 'gray.800', _dark: 'yellow.50' }, 'code-bg': { _light: 'gray.200', _dark: 'gray.700' }, 'code-bg-contrast': { _light: 'gray.800', _dark: 'gray.900' }, - bg: { _light: 'yellow.50', _dark: 'gray.800' } + 'code-text': { _light: 'green.50', _dark: 'green.50' }, + bg: { _light: 'yellow.50', _dark: 'gray.800' }, } } };