chore: update textStyles

This commit is contained in:
Nicolás Quiroz 2022-10-08 08:15:14 -05:00
parent 217410852f
commit 80afacda50
3 changed files with 63 additions and 54 deletions

View File

@ -1,2 +1,3 @@
export * from './colors';
export * from './sizes';
export * from './textStyles';

View File

@ -0,0 +1,60 @@
export const textStyles = {
h1: {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 700,
fontSize: '2.75rem',
lineHeight: '3.375rem',
letterSpacing: '5%',
color: 'brand.light.body'
},
h2: {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 400,
fontSize: '1.5rem',
lineHeight: 'auto',
letterSpacing: '4%',
color: 'brand.light.body'
},
'homepage-description': {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 700,
lineHeight: '21px',
letterSpacing: '0.05em',
textAlign: { base: 'center', md: 'left' }
},
'homepage-primary-label': {
fontFamily: '"JetBrains Mono", monospace',
color: 'yellow.50',
fontWeight: 700,
textTransform: 'uppercase'
},
'home-section-link-label': {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 700,
textTransform: 'uppercase',
textAlign: 'center',
p: 4
},
'quick-link-text': {
fontFamily: '"Inter", sans-serif',
lineHeight: '26px'
},
'quick-link-label': {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 700,
textTransform: 'uppercase',
textAlign: 'center',
color: 'brand.light.primary',
_groupHover: { color: 'yellow.50' },
_groupActive: { color: 'yellow.50' },
_groupFocus: { color: 'yellow.50' }
},
'hero-text-small': {
fontSize: '13px',
fontFamily: '"Inter", sans-serif'
},
// TODO: refactor w/ semantic tokens for light/dark mode
'link-light': {},
// TODO: refactor w/ semantic tokens for light/dark mode
'text-light': {}
};

View File

@ -1,6 +1,6 @@
import { extendTheme } from '@chakra-ui/react';
import { colors, sizes } from './foundations';
import { colors, sizes, textStyles } from './foundations';
import { Button, Link } from './components';
const overrides = {
@ -17,59 +17,7 @@ const overrides = {
}
})
},
textStyles: {
h1: {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 700,
fontSize: '2.75rem',
lineHeight: '3.375rem',
letterSpacing: '5%',
color: 'brand.light.body'
},
h2: {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 400,
fontSize: '1.5rem',
lineHeight: 'auto',
letterSpacing: '4%',
color: 'brand.light.body'
},
'homepage-description': {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 700,
lineHeight: '21px',
letterSpacing: '0.05em',
textAlign: { base: 'center', md: 'left' }
},
'homepage-primary-label': {
fontFamily: '"JetBrains Mono", monospace',
color: 'yellow.50',
fontWeight: 700,
textTransform: 'uppercase'
},
'quick-link-text': {
fontFamily: '"Inter", sans-serif',
lineHeight: '26px'
},
'quick-link-label': {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 700,
textTransform: 'uppercase',
textAlign: 'center',
color: 'brand.light.primary',
_groupHover: { color: 'yellow.50' },
_groupActive: { color: 'yellow.50' },
_groupFocus: { color: 'yellow.50' }
},
'hero-text-small': {
fontSize: '13px',
fontFamily: '"Inter", sans-serif'
},
// TODO: refactor w/ semantic tokens for light/dark mode
'link-light': {},
// TODO: refactor w/ semantic tokens for light/dark mode
'text-light': {}
}
textStyles
};
export default extendTheme(overrides);