From 4d7db045e9c6faa69fc8018c6c36e63fe562973c Mon Sep 17 00:00:00 2001 From: Fred Carlsen Date: Fri, 30 Nov 2018 12:05:56 +0100 Subject: Tweak text --- packages/website/ts/@next/components/text.tsx | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'packages/website/ts/@next/components') diff --git a/packages/website/ts/@next/components/text.tsx b/packages/website/ts/@next/components/text.tsx index 911417639..4c6765cf6 100644 --- a/packages/website/ts/@next/components/text.tsx +++ b/packages/website/ts/@next/components/text.tsx @@ -5,6 +5,7 @@ import { colors } from 'ts/style/colors'; interface Props { size?: 'normal' | 'medium' | 'large'; + muted?: any; center?: boolean; } @@ -37,12 +38,22 @@ Text.defaultProps = { const StyledHeading = styled.h1` color: ${colors.white}; - font-size: 80px; - line-height: 1em; + font-size: 1.111111111rem; + line-height: 1.4em; ${(props: Props) => props.center && ` text-align: center `} + + ${(props: Props) => props.size === 'medium' && ` + font-size: 3.222222222rem; // 50px + line-height: 1.16em; + `} + + ${(props: Props) => props.size === 'large' && ` + font-size: 4.444444444rem; // 80px + line-height: 1em; + `} `; const StyledIntro = styled.p` @@ -66,4 +77,8 @@ const StyledText = styled.p` ${(props: Props) => props.center && ` text-align: center `} -`; \ No newline at end of file + + ${(props: Props) => props.muted && ` + opacity: ${typeof props.muted === 'string' ? props.muted : '0.8'}; + `} +`; -- cgit