Repository URL to install this package:
Version:
0.9.6 ▾
|
import { styled } from 'view-container'
import { H3 } from 'atoms/Text/Heading'
import {
DetailedList,
DetailedListWrapper,
DetailedListValue,
DetailedListLabel,
DetailedListItemPanel,
} from 'molecules/DetailedList'
import { Button, ButtonLabel, ButtonIcon } from 'atoms/Button'
const StyledDetailedList = styled.withComponent(DetailedList)`
display: flex;
margin: 0;
justify-content: center;
flex-direction: column;
flex: 1;
${H3} {
display: none;
}
${DetailedListItemPanel} {
align-items: center;
margin: 0;
margin-bottom: rem(4);
height: 24px;
@media(max-width: 1023px) {
height: 16px;
}
@media (max-width: 767px) {
height: 20px;
}
${DetailedListLabel} {
white-space: nowrap;
}
${DetailedListValue} {
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
white-space: nowrap;
}
}
@media (max-width: 767px) {
${DetailedListItemPanel} {
flex: 0 0 100%;
flex-direction: row;
}
}
.successShipment {
${DetailedListValue} {
color: #009944;
}
}
${DetailedListValue} {
margin: 0 0 0 5px;
white-space: nowrap;
}
${DetailedListLabel}, ${DetailedListValue} {
position: relative;
font-weight: 700;
text-transform: capitalize;
color: #2c2c2c;
font-size: 20px;
@media (max-width: 1023px) {
font-size: 14px;
line-height: 20px;
}
}
${DetailedListItemPanel}:nth-child(2){
${DetailedListValue}:nth-child(2) {
text-transform: none;
}
}
`
const StyledButton = styled.withComponent(Button)`
border: none;
background: transparent;
padding: 0;
align-self: flex-start;
${ButtonIcon} {
margin: 0;
}
${ButtonLabel} {
text-transform: capitalize;
font-size: 18px;
font-weight: 700;
color: #2c2c2c;
margin: 0;
margin-right: 8px;
@media (max-width: 1023px) {
font-size: 14px;
margin-right: rem(4);
}
${props => props.desktopLabel && styled.css`
&:before {
content: '${props.desktopLabel}';
}
`}
${props => props.mobileLabel && styled.css`
@phone-or-smaller() {
&:before {
content: '${props.mobileLabel}';
}
}
`}
}
`
export { StyledDetailedList, StyledButton }