Repository URL to install this package:
|
Version:
2.1.8 ▾
|
import { styled } from 'styleh-components'
import {
TextPlaceholder,
RectanglePlaceholder,
} from '@skava/ui/dist/components/atoms/Placeholder'
const StyledItemText = styled(TextPlaceholder) `
width: rem(100);
height: rem(15);
margin-bottom: rem(4);
@phone-or-smaller() {
&:first-child {
margin-right: rem(8);
}
}
`
const StyledRectanglePlaceholder = styled(RectanglePlaceholder) `
width: rem(110);
height: rem(44);
@tablet-or-smaller() {
width: rem(125);
}
@phone-or-smaller() {
margin-bottom: rem(8);
}
`
const StyledTextPlaceholder = styled(TextPlaceholder) `
width: rem(100);
height: rem(15);
margin-bottom: rem(4);
&:last-child {
margin-bottom: none;
}
`
const ProductOptions = styled.div `
display: flex;
flex-direction: column;
margin: rem(8) 0;
`
const BrandNamePlaceholder = styled(TextPlaceholder) `
margin-bottom: rem(8);
`
const ProductDetails = styled.div `
display: flex;
flex-direction: column;
flex: 1;
`
const StyledImageWrapper = styled.div `
flex: 0 0 rem(158);
margin-right: rem(30);
align-self: flex-start;
svg {
width: 100%;
}
@tablet-or-smaller() {
flex: 0 0 rem(118);
}
@phone-or-smaller() {
flex: 0 0 rem(112);
margin-right: rem(8);
}
`
const TotalPriceWrapper = styled.div.attrs({
'data-qa': 'qa-product-total',
}) `
display: flex;
flex: 0 0 20%;
align-items: flex-end;
flex-direction: column;
@phone-or-smaller() {
flex: unset;
align-items: flex-start;
}
`
const PriceWrapper = styled.div.attrs({
'data-qa': 'qa-product-price',
}) `
display: flex;
flex: 0 0 20%;
align-items: flex-end;
flex-direction: column;
flex-wrap: wrap;
@phone-or-smaller() {
flex: unset;
align-items: flex-start;
flex-direction: row;
}
`
const QuantityWrapper = styled.div.attrs({
'data-qa': 'qa-product-quantity',
}) `
display: flex;
flex: 0 0 20%;
justify-content: flex-end;
align-items: baseline;
@phone-or-smaller() {
flex: unset;
justify-content: flex-start;
}
`
const ProductWrapper = styled.div `
display: flex;
flex: 1;
flex-direction: row;
@phone-or-smaller() {
flex-direction: column;
}
`
const Wrapper = styled.div `
display: flex;
flex-direction: row;
`
export {
StyledItemText,
StyledRectanglePlaceholder,
StyledTextPlaceholder,
ProductOptions,
BrandNamePlaceholder,
ProductDetails,
StyledImageWrapper,
TotalPriceWrapper,
PriceWrapper,
QuantityWrapper,
ProductWrapper,
Wrapper,
}