Repository URL to install this package:
|
Version:
0.14.1 ▾
|
import { styled } from 'styleh-components'
import { Button, ButtonLabel, ButtonIcon } from 'atoms/Button'
import { StyledBaseText } from 'atoms/Text'
import { wording } from 'src/words'
const DefaultButton = styled.withComponent(Button) `
width: rem(260);
height: rem(44);
border-radius: rem(4);
margin-bottom: rem(16);
@tablet-or-smaller() {
width: rem(160);
}
@phone-or-smaller() {
width: 100%;
}
${ButtonLabel} {
font-size: rem(18);
text-transform: capitalize;
margin: 0;
}
`
const StyledPrimaryButton = styled.withComponent(DefaultButton).attrs({
'data-qa': 'qa-buy-now',
}) `
background-color: #159fd5;
color: #ffffff;
border: none;
`
const StyledSecondaryButton = styled.withComponent(DefaultButton) `
background-color: #ffffff;
color: #5f6c88;
border: rem(1) solid #5f6c88;
font-weight: 500;
`
const StyledSkipButton = styled.withComponent(StyledSecondaryButton).attrs({
'data-qa': 'qa-skip-one-time',
}) ``
const StyledPauseButton = styled.withComponent(StyledSecondaryButton).attrs({
'data-qa': 'qa-pause-subscription',
}) `
${ButtonLabel} {
&:before {
@desktop-or-larger() {
content: '${wording.pauseSubscription}';
}
@tablet-or-smaller() {
content: '${wording.pauseButtonLabel}';
}
}
}
`
const StyledCancelButton = styled.withComponent(DefaultButton).attrs({
'data-qa': 'qa-cancel-subscription',
}) `
background-color: #5f6c88;
color: #ffffff;
border: none;
${ButtonLabel} {
&:before {
@desktop-or-larger() {
content: '${wording.cancelSubscription}';
}
@tablet-or-smaller() {
content: '${wording.cancel}';
}
}
}
`
const StyledText = StyledBaseText.as('span')
const StyledStatus = styled.withComponent(StyledText) `
${props =>
props.color &&
styled.css `
color: ${props.color};
`}
font-weight: 500;
text-transform: capitalize;
`
const StyledToggleButton = styled.withComponent(Button) `
background: transparent;
border: 0;
padding: 0;
justify-content: flex-end;
margin-bottom: rem(32);
@phone-or-smaller() {
flex: 0 0 100%;
display: flex;
justify-content: center;
order: 1;
}
${ButtonLabel} {
font-size: rem(18);
text-transform: capitalize;
margin: 0;
font-weight: 500;
@tablet-or-smaller() {
font-size: rem(14);
}
}
${ButtonIcon} {
margin: 0;
@desktop-or-larger() {
padding-left: rem(8);
}
}
`
export {
StyledPrimaryButton,
StyledSkipButton,
StyledPauseButton,
StyledCancelButton,
StyledStatus,
StyledToggleButton,
}