diff options
author | Ezekiel Aquino <ezekiel@bakkenbaeck.no> | 2018-11-30 23:25:37 +0800 |
---|---|---|
committer | Ezekiel Aquino <ezekiel@bakkenbaeck.no> | 2018-11-30 23:25:54 +0800 |
commit | 5c12e664a96296dae720433deb8bf98b10a5fbcb (patch) | |
tree | 4affdf2110d3d5df49f4d4710081ca068893aaeb /packages/website/ts/@next/components/text.tsx | |
parent | 46422ff78302a410178b42947e1b483b712c920f (diff) | |
download | dexon-0x-contracts-5c12e664a96296dae720433deb8bf98b10a5fbcb.tar.gz dexon-0x-contracts-5c12e664a96296dae720433deb8bf98b10a5fbcb.tar.zst dexon-0x-contracts-5c12e664a96296dae720433deb8bf98b10a5fbcb.zip |
WIP themeprovider
Diffstat (limited to 'packages/website/ts/@next/components/text.tsx')
-rw-r--r-- | packages/website/ts/@next/components/text.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/website/ts/@next/components/text.tsx b/packages/website/ts/@next/components/text.tsx index c0d683973..9e16c9411 100644 --- a/packages/website/ts/@next/components/text.tsx +++ b/packages/website/ts/@next/components/text.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import styled from 'styled-components'; +import styled, { withTheme } from 'styled-components'; import { colors } from 'ts/style/colors'; interface HeadingProps { @@ -47,7 +47,7 @@ const PARAGRAPH_SIZES: ParagraphSizes = { }; const StyledHeading = styled.h1<HeadingProps>` - color: ${props => props.color || colors.white}; + color: ${props => props.color || props.theme.textColor}; font-size: ${props => HEADING_SIZES[props.size || 'default']}; font-weight: 300; margin-bottom: ${props => !props.noMargin && '30px'}; @@ -60,7 +60,6 @@ export const Heading: React.StatelessComponent<HeadingProps> = props => { children, } = props; const Component = StyledHeading.withComponent(asElement); - return <Component {...props}>{children}</Component>; }; @@ -69,6 +68,7 @@ export const Paragraph = styled.p<ParagraphProps>` font-size: ${props => PARAGRAPH_SIZES[props.size || 'default']}; margin-bottom: ${props => !props.noMargin && '30px'}; line-height: 1.4; - color: ${props => `rgba(255, 255, 255, ${props.muted || 0.75})`}; + color: ${props => props.color || props.theme.textColor}; + opacity: ${props => props.muted || 0.75}; text-align: ${props => props.center && 'center'}; `; |