diff options
author | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
---|---|---|
committer | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
commit | 7ae38906926dc09bc10670c361af0d2bf0050426 (patch) | |
tree | 5fb10ae366b987db09e4ddb4bc3ba0f75404ad08 /packages/dev-tools-pages/ts/components/content-block.tsx | |
parent | b5fd3c72a08aaa6957917d74c333387a16edf66b (diff) | |
download | dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.gz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.bz2 dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.lz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.xz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.zst dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.zip |
Update dependency packages
Diffstat (limited to 'packages/dev-tools-pages/ts/components/content-block.tsx')
-rw-r--r-- | packages/dev-tools-pages/ts/components/content-block.tsx | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/packages/dev-tools-pages/ts/components/content-block.tsx b/packages/dev-tools-pages/ts/components/content-block.tsx deleted file mode 100644 index b800c5d44..000000000 --- a/packages/dev-tools-pages/ts/components/content-block.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import * as _ from 'lodash'; -import * as React from 'react'; -import styled from 'styled-components'; - -import { ContextInterface } from 'ts/context'; -import { media } from 'ts/variables'; - -import { Alpha, Beta } from './typography'; - -const Base = styled.div` - display: flex; - align-items: flex-start; - justify-content: space-between; - :not(:last-of-type) { - margin-bottom: 6.25rem; - } - ${Beta} { - margin-bottom: 2.5rem; - } - ${media.small` - display: block; - :not(:last-of-type) { - margin-bottom: 3.125rem; - } - `}; -`; - -const Content = styled.div` - width: 66.693548387%; - ${media.small` - width: 100%; - `}; -`; - -const Item = styled.div` - p { - max-width: 31.25rem; - } - - &:not(:last-of-type) { - margin-bottom: 2.5rem; - ${media.small` - margin-bottom: 1.875rem; - `}; - } -`; - -const StyledTitle = styled(Alpha)` - color: ${props => props.color}; - ${media.small` - & + div { - margin-top: 1.5rem; - } - `}; -`; - -interface ContentBlockProps extends ContextInterface { - title: string; - main?: boolean; - children?: React.ReactNode; -} - -const ContentBlock: React.StatelessComponent<ContentBlockProps> = props => { - const children = React.Children.map(props.children, child => { - return <Item>{child}</Item>; - }); - - const Title = props.main ? StyledTitle : Beta; - - return ( - <Base> - <Title color={props.colors}>{props.title}</Title> - {_.isUndefined(children) ? null : <Content>{children}</Content>} - </Base> - ); -}; - -export { ContentBlock }; |