import styled, { StyledComponent } from '@emotion/styled'; import { Box, Flex, Text } from '@rebass/emotion'; import { css } from '@emotion/core'; import { breakpoints, BREAKPOINT_VALUES } from 'utils/theme'; import { getColumnSize } from 'utils/styles/grid'; import { Z_INDEX } from 'utils/constants/z-indexes'; import { forTabletDown, forPhoneOnly, forTabletOnly, forDesktopUp, forTabletUp } from 'utils/styles/mixins'; export const Container: StyledComponent = styled(Flex)` margin 0 auto; position: relative; height: ${(props: any) => props.hasBadge ? 430 : 332}px; ${forPhoneOnly(css` max-width: 375px; `)}; ${forTabletOnly(css` max-width: 768px; height: 283px; `)}; ${forDesktopUp(css` max-width: 1170px; height: 162px; `)}; `; export const Badge: StyledComponent = styled(Box)` width: 98px; height: 98px; img { width: 100%; height: 100%; } ${forPhoneOnly(css` position: inherit; `)}; ${forTabletOnly(css` position: absolute; top: 20px; left: 20px; `)}; ${forDesktopUp(css` position: inherit; `)}; `; export const ContentContainer: StyledComponent = styled(Flex)` flex: 1; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; margin: 30px; z-index: ${Z_INDEX.FOOTER_CONTENT}; ${(props: any) => props.hasBadge && forPhoneOnly(css` margin-top: 10px; `)}; ${forDesktopUp(css` flex-direction: row; `)}; path { stroke: ${(props: any) => props.colour}; } `; export const ButtonWrapper = styled(Box)` max-width: ${getColumnSize(2)}px; `; export const IconContainer: StyledComponent = styled(Box)` path { fill: ${(props: any) => props.colour}; } ` export const Copy: StyledComponent = styled(Text)` ${forTabletOnly(css` max-width: 460px; `)}; @media(min-width: ${BREAKPOINT_VALUES.MEDIUM + 1}px) { text-align: left; max-width: ${(props: any): any => props.hasBadge ? 500 : 610}px; } `; export const Icon = css` max-width: 131px; @media (min-width: ${breakpoints.small}) { max-width: 181px; } svg { width: 100%; } `; export const DesktopBackground: StyledComponent = styled.div` position: absolute; min-height: 300px; height: 100%; width: 100%; .gatsby-background-image-desktop-banner { position: absolute !important; top: 0px; bottom: 0px; left: 0; width: 100%; height: 162px; display: none; &::before, &::after { background-position: left; } ${forDesktopUp(css` display: block; `)}; } .gatsby-background-image-tablet-banner { position: absolute !important; top: 0px; bottom: 0px; left: 0; width: 100%; height: 283px; display: none; &::before, &::after { background-position: left; } ${forTabletDown(css` display: block; `)}; } .gatsby-background-image-mobile-banner { position: absolute !important; top: 0px; bottom: 0px; left: 0; width: 100%; display: none; height: ${(props: any) => props.hasBadge ? 430 : 332}px; &::before, &::after { background-position: center; } ${forPhoneOnly(css` display: block; `)}; } `;