diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-12-21 08:01:53 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-12-21 08:01:53 +0800 |
commit | abdf91c691b924b75d71db49fba296da9c8ddcac (patch) | |
tree | 78e62a107f1de7f3b16dd63bdbc039ab26b561a3 /packages/website/ts/@next/components/hero.tsx | |
parent | 9b540fd8e52e7578d3749e6d9ef9cd97d602ffb3 (diff) | |
download | dexon-sol-tools-abdf91c691b924b75d71db49fba296da9c8ddcac.tar dexon-sol-tools-abdf91c691b924b75d71db49fba296da9c8ddcac.tar.gz dexon-sol-tools-abdf91c691b924b75d71db49fba296da9c8ddcac.tar.bz2 dexon-sol-tools-abdf91c691b924b75d71db49fba296da9c8ddcac.tar.lz dexon-sol-tools-abdf91c691b924b75d71db49fba296da9c8ddcac.tar.xz dexon-sol-tools-abdf91c691b924b75d71db49fba296da9c8ddcac.tar.zst dexon-sol-tools-abdf91c691b924b75d71db49fba296da9c8ddcac.zip |
feat: move all @next files to non @next directory
Diffstat (limited to 'packages/website/ts/@next/components/hero.tsx')
-rw-r--r-- | packages/website/ts/@next/components/hero.tsx | 152 |
1 files changed, 0 insertions, 152 deletions
diff --git a/packages/website/ts/@next/components/hero.tsx b/packages/website/ts/@next/components/hero.tsx deleted file mode 100644 index 4c8874d3e..000000000 --- a/packages/website/ts/@next/components/hero.tsx +++ /dev/null @@ -1,152 +0,0 @@ -import * as React from 'react'; -import styled from 'styled-components'; - -import { addFadeInAnimation } from 'ts/@next/constants/animations'; - -interface Props { - title: string; - maxWidth?: string; - maxWidthHeading?: string; - isLargeTitle?: boolean; - isFullWidth?: boolean; - isCenteredMobile?: boolean; - description: string; - figure?: React.ReactNode; - actions?: React.ReactNode; -} - -const Section = styled.section` - padding: 120px 0; - - @media (max-width: 768px) { - padding: 60px 0; - } -`; - -interface WrapProps { - isCentered?: boolean; - isFullWidth?: boolean; - isCenteredMobile?: boolean; -} -const Wrap = - styled.div < - WrapProps > - ` - width: calc(100% - 60px); - margin: 0 auto; - - @media (min-width: 768px) { - max-width: ${props => (!props.isFullWidth ? '895px' : '1136px')}; - flex-direction: row-reverse; - display: flex; - align-items: center; - text-align: ${props => props.isCentered && 'center'}; - justify-content: ${props => (props.isCentered ? 'center' : 'space-between')}; - } - - @media (max-width: 768px) { - text-align: ${props => (props.isCenteredMobile ? `center` : 'left')}; - } -`; - -interface TitleProps { - isLarge?: any; - maxWidth?: string; -} -const Title = - styled.h1 < - TitleProps > - ` - font-size: ${props => (props.isLarge ? '80px' : '50px')}; - font-weight: 300; - line-height: 1.1; - margin-left: auto; - margin-right: auto; - margin-bottom: 30px; - max-width: ${props => props.maxWidth}; - ${addFadeInAnimation('0.5s')} - - @media (max-width: 1024px) { - font-size: 60px; - } - - @media (max-width: 768px) { - font-size: 46px; - } -`; - -const Description = styled.p` - font-size: 22px; - line-height: 31px; - font-weight: 300; - padding: 0; - margin-bottom: 50px; - color: ${props => props.theme.introTextColor}; - ${addFadeInAnimation('0.5s', '0.15s')} @media (max-width: 1024px) { - margin-bottom: 30px; - } -`; - -const Content = - styled.div < - { width: string } > - ` - width: 100%; - - @media (min-width: 768px) { - max-width: ${props => props.width}; - } -`; - -const ButtonWrap = styled.div` - display: inline-flex; - align-items: center; - - * + * { - margin-left: 12px; - } - - > *:nth-child(1) { - ${addFadeInAnimation('0.6s', '0.3s')}; - } - > *:nth-child(2) { - ${addFadeInAnimation('0.6s', '0.4s')}; - } - - @media (max-width: 500px) { - flex-direction: column; - justify-content: center; - - * { - padding-left: 20px; - padding-right: 20px; - } - - * + * { - margin-left: 0; - margin-top: 12px; - } - } -`; - -export const Hero: React.StatelessComponent<Props> = (props: Props) => ( - <Section> - <Wrap isCentered={!props.figure} isFullWidth={props.isFullWidth} isCenteredMobile={props.isCenteredMobile}> - {props.figure && <Content width="400px">{props.figure}</Content>} - - <Content width={props.maxWidth ? props.maxWidth : props.figure ? '546px' : '678px'}> - <Title isLarge={props.isLargeTitle} maxWidth={props.maxWidthHeading}> - {props.title} - </Title> - - <Description>{props.description}</Description> - - {props.actions && <ButtonWrap>{props.actions}</ButtonWrap>} - </Content> - </Wrap> - </Section> -); - -Hero.defaultProps = { - isCenteredMobile: true, -}; |