diff options
author | August Skare <post@augustskare.no> | 2018-10-22 19:18:51 +0800 |
---|---|---|
committer | August Skare <post@augustskare.no> | 2018-10-22 19:27:49 +0800 |
commit | 8cf720986eb464a39e634ca59c4c3b20b3cd368d (patch) | |
tree | 03290fd36ab0ac6f6252141abaeaf930a6a5a3f1 /packages/dev-tools-pages/ts/components/Content.tsx | |
parent | 97c54f84f0b0f3daf41773690cc79296c983b346 (diff) | |
download | dexon-sol-tools-8cf720986eb464a39e634ca59c4c3b20b3cd368d.tar dexon-sol-tools-8cf720986eb464a39e634ca59c4c3b20b3cd368d.tar.gz dexon-sol-tools-8cf720986eb464a39e634ca59c4c3b20b3cd368d.tar.bz2 dexon-sol-tools-8cf720986eb464a39e634ca59c4c3b20b3cd368d.tar.lz dexon-sol-tools-8cf720986eb464a39e634ca59c4c3b20b3cd368d.tar.xz dexon-sol-tools-8cf720986eb464a39e634ca59c4c3b20b3cd368d.tar.zst dexon-sol-tools-8cf720986eb464a39e634ca59c4c3b20b3cd368d.zip |
rename Main to Content
Diffstat (limited to 'packages/dev-tools-pages/ts/components/Content.tsx')
-rw-r--r-- | packages/dev-tools-pages/ts/components/Content.tsx | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/dev-tools-pages/ts/components/Content.tsx b/packages/dev-tools-pages/ts/components/Content.tsx new file mode 100644 index 000000000..6c0270dbc --- /dev/null +++ b/packages/dev-tools-pages/ts/components/Content.tsx @@ -0,0 +1,44 @@ +import * as React from 'react'; +import styled from 'styled-components'; + +import { Beta } from './Typography'; +import Container from './Container'; +import ContentBlock from './ContentBlock'; + +const StyledMain = + styled.div < + MainProps > + ` + padding-top: 6.25rem; + padding-bottom: 6.25rem; + ${props => + props.dark + ? ` + background-color: #000; + color: #fff; + ` + : ''}; +`; + +interface MainProps { + title?: string; + subtitle?: string; + dark?: boolean; + children: React.ReactNode; +} + +function Main(props: MainProps) { + return ( + <StyledMain dark={props.dark}> + <Container> + <ContentBlock main title={props.title || 'Get started'}> + {props.subtitle ? <Beta as="p">{props.subtitle}</Beta> : null} + </ContentBlock> + + {props.children} + </Container> + </StyledMain> + ); +} + +export default Main; |