diff --git a/src/scripts/components/main/button/button.styl b/src/scripts/components/main/button/button.styl index 318e01972..4be93c011 100644 --- a/src/scripts/components/main/button/button.styl +++ b/src/scripts/components/main/button/button.styl @@ -31,3 +31,8 @@ svg fill: $textDefault + +@media screen and (max-width: 480px) + .hideLabel + span + display: none diff --git a/src/scripts/components/main/button/button.tsx b/src/scripts/components/main/button/button.tsx index 5f1f9f700..41be586fb 100644 --- a/src/scripts/components/main/button/button.tsx +++ b/src/scripts/components/main/button/button.tsx @@ -11,6 +11,7 @@ interface Props { link?: string; disabled?: boolean; className?: string; + hideLabelOnMobile?: boolean; onClick?: (event: React.MouseEvent) => void; } @@ -20,13 +21,14 @@ const Button: FunctionComponent = ({ icon: Icon, disabled = false, className = '', + hideLabelOnMobile, onClick }) => { const classes = cx( styles.button, className, disabled && styles.disabled, - disabled && className + hideLabelOnMobile && styles.hideLabel ); return link ? ( diff --git a/src/scripts/components/stories/header/header.styl b/src/scripts/components/stories/header/header.styl index f9ab56a44..65c26356b 100644 --- a/src/scripts/components/stories/header/header.styl +++ b/src/scripts/components/stories/header/header.styl @@ -24,6 +24,12 @@ white-space: nowrap font-size: emCalc(18px) +@media screen and (max-width: 480px) + .title + flex-basis: 400px + overflow: hidden + text-overflow: ellipsis + .rightContent display: flex flex-grow: 1 diff --git a/src/scripts/components/stories/header/header.tsx b/src/scripts/components/stories/header/header.tsx index 81076a294..9beca5aff 100644 --- a/src/scripts/components/stories/header/header.tsx +++ b/src/scripts/components/stories/header/header.tsx @@ -32,6 +32,7 @@ const Header: FunctionComponent = ({ icon={ArrowBackIcon} label={backButtonId} link={backLink} + hideLabelOnMobile /> {!isSplashScreen &&

{title}

}
{children}
diff --git a/src/scripts/components/stories/splash-screen/splash-screen.styl b/src/scripts/components/stories/splash-screen/splash-screen.styl index a74772cf5..f8bbb4daa 100644 --- a/src/scripts/components/stories/splash-screen/splash-screen.styl +++ b/src/scripts/components/stories/splash-screen/splash-screen.styl @@ -26,3 +26,8 @@ p line-height: emCalc(22px) + +@media screen and (max-width: 480px) + .content + padding: emCalc(20px) + width: 80% diff --git a/src/scripts/components/stories/splash-screen/splash-screen.tsx b/src/scripts/components/stories/splash-screen/splash-screen.tsx index 320cf0074..dbfd11273 100644 --- a/src/scripts/components/stories/splash-screen/splash-screen.tsx +++ b/src/scripts/components/stories/splash-screen/splash-screen.tsx @@ -20,7 +20,8 @@ const SplashScreen: FunctionComponent = ({storyId, slide}) => { className={styles.splashscreen} style={{ background: `center / cover no-repeat url(${imageUrl}) rgba(0, 0, 0, 0.3)`, - width: '100%' + width: '100%', + height: '100%' }}>
:last-child + height: 300px + + > * + padding: 25px + width: inherit