omnivore/packages/web/components/elements/StyledText.tsx

239 lines
4.8 KiB
TypeScript
Raw Normal View History

2022-02-11 17:24:33 +00:00
import { styled } from '../tokens/stitches.config'
const textVariants = {
style: {
body: {
fontSize: '$2',
lineHeight: '1.25',
},
logoTitle: {
fontFamily: 'Inter',
fontWeight: 700,
fontSize: '18px',
textTransform: 'uppercase',
letterSpacing: '0.15em',
// '@smDown': {
// display: 'none',
// visibility: 'collapse',
// }
},
bodyBold: {
fontWeight: 'bold',
fontSize: '$2',
lineHeight: '1.25',
},
recommendedByline: {
2022-12-12 15:49:15 +00:00
fontWeight: 'bold',
fontSize: '13.5px',
paddingTop: '4px',
mt: '0px',
2022-12-12 15:49:15 +00:00
mb: '16px',
color: '$grayTextContrast',
},
userName: {
fontWeight: '600',
fontSize: '13.5px',
paddingTop: '4px',
my: '6px',
color: '$grayText',
},
userNote: {
fontSize: '16px',
paddingTop: '0px',
marginTop: '0px',
lineHeight: '1.5',
color: '$grayTextContrast',
},
2022-02-11 17:24:33 +00:00
headline: {
fontSize: '$4',
'@md': {
fontSize: '$6',
},
},
fixedHeadline: {
2022-03-30 17:26:47 +00:00
fontSize: '24px',
2022-02-11 17:24:33 +00:00
fontWeight: '500',
},
subHeadline: {
fontSize: '24px',
fontWeight: '500',
2022-02-11 17:24:33 +00:00
},
2023-02-07 07:41:22 +00:00
articleTitle: {
fontWeight: 'bold',
2023-05-02 03:55:33 +00:00
fontSize: '35px',
'@mdDown': {
fontSize: '25px',
},
2023-02-07 07:41:22 +00:00
margin: 0,
},
2022-02-11 17:24:33 +00:00
boldHeadline: {
fontWeight: 'bold',
fontSize: '$4',
'@md': {
fontSize: '$6',
},
margin: 0,
},
modalHeadline: {
2023-03-02 04:59:31 +00:00
fontWeight: '600',
2023-03-03 05:29:36 +00:00
fontFamily: '$display',
2023-03-06 02:31:11 +00:00
fontSize: '20px',
2023-03-02 04:59:31 +00:00
lineHeight: '20px',
2022-02-11 17:24:33 +00:00
color: '$grayText',
margin: 0,
},
modalTitle: {
fontSize: '16px',
fontWeight: '600',
color: '$grayText',
lineHeight: '1.50',
margin: 0,
},
boldText: {
fontWeight: '600',
fontSize: '16px',
lineHeight: '1',
2023-03-09 05:18:44 +00:00
color: '$thTextContrast',
},
shareHighlightModalAnnotation: {
fontSize: '18px',
lineHeight: '23.4px',
2022-07-12 01:14:19 +00:00
color: '$utilityTextSubtle',
m: 0,
},
2022-02-11 17:24:33 +00:00
footnote: {
fontSize: '$1',
},
shareTitle: {
fontSize: '$1',
fontWeight: '700',
color: '$grayTextContrast',
2022-02-11 17:24:33 +00:00
},
shareSubtitle: {
fontSize: '$1',
color: '$grayText',
},
listTitle: {
fontSize: '16px',
fontWeight: '500',
color: '$grayTextContrast',
lineHeight: '1.5',
wordBreak: 'break-word',
},
caption: {
color: '$grayText',
fontSize: '12px',
lineHeight: '1.5',
wordBreak: 'break-word',
},
captionLink: {
fontSize: '$2',
textDecoration: 'underline',
lineHeight: '1.5',
cursor: 'pointer',
},
2022-08-10 06:28:39 +00:00
action: {
fontSize: '16px',
fontWeight: '500',
lineHeight: '1.5',
},
actionLink: {
fontSize: '16px',
fontWeight: '500',
lineHeight: '1.5',
textDecoration: 'underline',
cursor: 'pointer',
},
2022-02-11 17:24:33 +00:00
navLink: {
m: 0,
fontSize: '$1',
fontWeight: 400,
color: '$graySolid',
cursor: 'pointer',
'&:hover': {
opacity: 0.7,
},
},
controlButton: {
color: '$grayText',
fontWeight: '500',
fontFamily: 'inter',
fontSize: '14px',
},
menuTitle: {
pt: '0px',
m: '0px',
color: '$utilityTextDefault',
fontSize: 16,
fontFamily: 'inter',
fontWeight: '500',
lineHeight: 'unset',
2022-02-11 17:24:33 +00:00
},
2022-08-11 09:34:14 +00:00
libraryHeader: {
pt: '0px',
m: '0px',
fontSize: 24,
fontFamily: 'inter',
lineHeight: 'unset',
fontWeight: 'bold',
2022-08-11 09:34:14 +00:00
color: '$textSubtle',
},
aboutFooter: {
pt: '0px',
m: '0px',
fontSize: 24,
fontFamily: 'inter',
lineHeight: 'unset',
fontWeight: 'bold',
color: 'white',
},
2023-02-28 10:01:57 +00:00
displaySettingsLabel: {
2023-03-03 05:29:36 +00:00
fontFamily: '$display',
2023-02-28 10:01:57 +00:00
fontWeight: '500',
fontSize: '12px',
lineHeight: '20px',
2023-03-03 04:15:02 +00:00
color: '$thTextSubtle2',
2023-02-28 10:01:57 +00:00
},
2022-02-11 17:24:33 +00:00
error: {
color: '$error',
fontSize: '$2',
lineHeight: '1.25',
},
},
}
export const StyledText = styled('p', {
fontFamily: 'Inter',
fontWeight: 'normal',
lineHeight: '120%',
2022-02-11 17:24:33 +00:00
color: '$grayTextContrast',
variants: textVariants,
defaultVariants: {
style: 'footnote',
},
})
2022-12-08 04:05:44 +00:00
export const StyledTextSpan = styled('span', StyledText)
2022-02-11 17:24:33 +00:00
export const StyledListElement = styled('li', {
fontFamily: 'Inter',
fontWeight: 'normal',
lineHeight: '1.35',
color: '$grayTextContrast',
})
export const StyledList = styled('ul', {
fontFamily: 'Inter',
fontWeight: 'normal',
lineHeight: '1.35',
color: '$grayTextContrast',
})
export const StyledImg = styled('img', {})
2022-03-28 12:57:28 +00:00
export const StyledAnchor = styled('a', {
textDecoration: 'none',
2022-03-28 12:57:28 +00:00
})
2022-05-03 19:09:32 +00:00
export const StyledMark = styled('mark', {})