diff options
author | Fred Carlsen <fred@sjelfull.no> | 2018-12-15 03:20:27 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-15 03:20:27 +0800 |
commit | ceddc019853632f54dd803f5673e8688d38246ee (patch) | |
tree | dc051b66a060ecd141d64634ac060cbf3fedad40 /packages/website/ts/@next/components/text.tsx | |
parent | 1955c846f27ee5830bfbff201237dae6dcc99e5d (diff) | |
download | dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar.gz dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar.bz2 dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar.lz dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar.xz dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar.zst dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.zip |
Type fixes
Diffstat (limited to 'packages/website/ts/@next/components/text.tsx')
-rw-r--r-- | packages/website/ts/@next/components/text.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/website/ts/@next/components/text.tsx b/packages/website/ts/@next/components/text.tsx index eb20c16e6..7236a5a37 100644 --- a/packages/website/ts/@next/components/text.tsx +++ b/packages/website/ts/@next/components/text.tsx @@ -33,7 +33,7 @@ const StyledHeading = styled.h1<HeadingProps>` display: ${props => props.isFlex && `inline-flex`}; align-items: center; justify-content: ${props => props.isFlex && `space-between`}; - font-size: ${props => isNaN(props.size) ? `var(--${props.size || 'default'}Heading)` : `${props.size}px`}; + font-size: ${props => typeof props.size === 'string' ? `var(--${props.size || 'default'}Heading)` : `${props.size}px`}; line-height: ${props => `var(--${props.size || 'default'}HeadingHeight)`}; text-align: ${props => props.isCentered && 'center'}; padding: ${props => props.padding && getCSSPadding(props.padding)}; @@ -49,7 +49,7 @@ export const Heading: React.StatelessComponent<HeadingProps> = props => { const { asElement = 'h1', children, - ...style, + ...style } = props; const Component = StyledHeading.withComponent(asElement); |