From 98325e1cfb4f6c732728fe2943895fad2cb03be5 Mon Sep 17 00:00:00 2001 From: Ezekiel Aquino Date: Wed, 12 Dec 2018 17:39:31 +0100 Subject: Tests animations on about page headers --- .../ts/@next/components/aboutPageLayout.tsx | 26 +++++++++++++++++----- packages/website/ts/@next/components/siteWrap.tsx | 3 +++ packages/website/ts/@next/components/text.tsx | 2 +- packages/website/ts/@next/pages/why.tsx | 6 ++--- 4 files changed, 27 insertions(+), 10 deletions(-) (limited to 'packages/website/ts') diff --git a/packages/website/ts/@next/components/aboutPageLayout.tsx b/packages/website/ts/@next/components/aboutPageLayout.tsx index 9f55c2e81..002d35c0c 100644 --- a/packages/website/ts/@next/components/aboutPageLayout.tsx +++ b/packages/website/ts/@next/components/aboutPageLayout.tsx @@ -7,6 +7,8 @@ import { Column, Section } from 'ts/@next/components/newLayout'; import { SiteWrap } from 'ts/@next/components/siteWrap'; import { Heading, Paragraph } from 'ts/@next/components/text'; +import { addFadeInAnimation } from 'ts/@next/constants/animations'; + interface Props { title: string; description: React.Node; @@ -26,18 +28,18 @@ export const AboutPageLayout = (props: Props) => ( - + {props.title} - + - + {props.description} - + {(props.linkLabel && props.linkUrl) && - + {props.linkLabel} - + } @@ -46,3 +48,15 @@ export const AboutPageLayout = (props: Props) => ( {props.children} ); + +const AnimatedHeading = styled(Heading)` + ${addFadeInAnimation('0.5s')} +`; + +const AnimatedParagraph = styled(Paragraph)` + ${addFadeInAnimation('0.5s', '0.15s')} +`; + +const AnimatedLink = styled(Link)` + ${addFadeInAnimation('0.6s', '0.3s')} +`; diff --git a/packages/website/ts/@next/components/siteWrap.tsx b/packages/website/ts/@next/components/siteWrap.tsx index fab917eeb..48efb6e6b 100644 --- a/packages/website/ts/@next/components/siteWrap.tsx +++ b/packages/website/ts/@next/components/siteWrap.tsx @@ -29,6 +29,7 @@ const GLOBAL_THEMES: ThemeInterface = { darkBgColor: '#111A19', lightBgColor: '#003831', textColor: '#FFFFFF', + paragraphColor: '#777777', linkColor: colors.brandLight, dropdownBg: '#111A19', dropdownButtonBg: '#003831', @@ -40,6 +41,7 @@ const GLOBAL_THEMES: ThemeInterface = { light: { bgColor: '#FFFFFF', textColor: '#000000', + paragraphColor: '#474747', linkColor: colors.brandDark, dropdownBg: '#FBFBFB', dropdownButtonBg: '#F3F6F4', @@ -52,6 +54,7 @@ const GLOBAL_THEMES: ThemeInterface = { gray: { bgColor: '#e0e0e0', textColor: '#000000', + paragraphColor: '#777777', linkColor: colors.brandDark, dropdownBg: '#FFFFFF', dropdownButtonBg: '#F3F6F4', diff --git a/packages/website/ts/@next/components/text.tsx b/packages/website/ts/@next/components/text.tsx index 2ce47513f..9e801003f 100644 --- a/packages/website/ts/@next/components/text.tsx +++ b/packages/website/ts/@next/components/text.tsx @@ -63,7 +63,7 @@ export const Paragraph = styled.p` font-size: ${props => `var(--${props.size || 'default'}Paragraph)`}; margin-bottom: ${props => !props.isNoMargin && (props.marginBottom || '30px')}; padding: ${props => props.padding && getCSSPadding(props.padding)}; - color: ${props => props.color || props.theme.textColor}; + color: ${props => props.color || props.theme.paragraphColor}; opacity: ${props => typeof props.isMuted === 'boolean' ? 0.75 : props.isMuted}; text-align: ${props => props.isCentered && 'center'}; line-height: 1.4; diff --git a/packages/website/ts/@next/pages/why.tsx b/packages/website/ts/@next/pages/why.tsx index 7b30cd25a..18c4dc092 100644 --- a/packages/website/ts/@next/pages/why.tsx +++ b/packages/website/ts/@next/pages/why.tsx @@ -137,7 +137,7 @@ export class NextWhy extends React.PureComponent { - What 0x offers + What 0x offers {_.map(offersData, (item, index) => ( - Use Cases + Use Cases {_.map(useCaseSlides, (item, index) => ( - Exchange Functionality + Exchange Functionality {_.map(functionalityData, (item, index) => (