ihealth-kit-registration/src/pages/customerPortal/components/EmptyBlock.tsx
2023-05-01 23:39:21 +08:00

92 lines
2.2 KiB
TypeScript

import React, { FC } from 'react'
import styled from 'styled-components'
import { ExternalPaths, Paths } from 'routes/Paths'
import { Button } from 'components/Button'
import { Paragraph } from 'components/Typography'
import { ReactComponent as EmptySvg } from '../images/emptyBox.svg'
const StyledCard = styled.div`
width: 100%;
background: #FFFFFF;
border-radius: 7px;
box-shadow: 2px 1px 4px 1px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: row;
padding: 28px 32px;
${props => props.theme.breakpoints.down('s')} {
padding: 0 16px 30px 16px;
flex-direction: column;
}
`
const StyledImageWrapper = styled.div`
> svg {
width: 108px;
height: 89px;
}
${props => props.theme.breakpoints.down('s')} {
text-align: center;
> svg {
width: 113px;
height: 145px;
}
}
`
const StyledInfo = styled.div`
display: flex;
flex-direction: column;
box-sizing: border-box;
justify-content: center;
${props => props.theme.breakpoints.down('s')} {
margin-top: -20px;
}
${props => props.theme.breakpoints.up('s')} {
width: 56%;
max-width: 566px;
padding: 0 20px;
}
`
const StyledParagraph = styled(Paragraph)`
${props => props.theme.breakpoints.up('s')} {
margin-bottom: 10px !important;
}
`
const StyledButtonGroup = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
gap: 15px;
${props => props.theme.breakpoints.down('s')} {
align-items: center;
margin-top: 20px;
}
`
const StyledButton = styled(Button)`
width: 152px;
height: 28px;
font-size: 12px;
line-height: 28px;
`
export const EmptyBlock: FC = () => {
return (
<StyledCard>
<StyledImageWrapper><EmptySvg /></StyledImageWrapper>
<StyledInfo>
<StyledParagraph>Take the next step on your health and wellness journey!</StyledParagraph>
<Paragraph level={2}>Activate your iHealth CheckMeSafe kit, or shop our kits to get started.</Paragraph>
</StyledInfo>
<StyledButtonGroup>
<StyledButton href={Paths.Activate}>Activate Kit</StyledButton>
<StyledButton type="default" href={ExternalPaths.Shop} target="_blank" rel="noopener noreferrer">Shop
Products</StyledButton>
</StyledButtonGroup>
</StyledCard>
)
}