diff options
Diffstat (limited to 'packages/website/ts/@next/components')
-rw-r--r-- | packages/website/ts/@next/components/text.tsx | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/packages/website/ts/@next/components/text.tsx b/packages/website/ts/@next/components/text.tsx index 7d50530f6..3fcd5c776 100644 --- a/packages/website/ts/@next/components/text.tsx +++ b/packages/website/ts/@next/components/text.tsx @@ -19,25 +19,11 @@ interface ParagraphProps extends BaseTextInterface { isMuted?: boolean | number; } -interface ParagraphSizes { - default: string; - medium: string; - large: string; - [key: string]: string; -} - -const PARAGRAPH_SIZES: ParagraphSizes = { - default: '18px', - small: '14px', - medium: '22px', - large: '28px', -}; - const StyledHeading = styled.h1<HeadingProps>` color: ${props => props.color || props.theme.textColor}; - font-size: ${props => `var(--${props.size}Heading)`}; + font-size: ${props => `var(--${props.size || 'default'}Heading)`}; padding: ${props => props.padding && getCSSPadding(props.padding)}; - line-height: ${props => `var(--${props.size}HeadingHeight)`}; + line-height: ${props => `var(--${props.size || 'default'}HeadingHeight)`}; margin-bottom: ${props => !props.isNoMargin && '30px'}; text-align: ${props => props.isCentered && 'center'}; font-weight: 300; @@ -57,7 +43,7 @@ export const Heading: React.StatelessComponent<HeadingProps> = props => { // and be more generic. e.g. <Text /> with a props asElement so we can use it // for literally anything = export const Paragraph = styled.p<ParagraphProps>` - font-size: ${props => PARAGRAPH_SIZES[props.size || 'default']}; + font-size: ${props => `var(--${props.size || 'default'}Paragraph)`}; margin-bottom: ${props => !props.isNoMargin && '30px'}; padding: ${props => props.padding && getCSSPadding(props.padding)}; color: ${props => props.color || props.theme.textColor}; |