Repository URL to install this package:
Version:
0.9.6 ▾
|
ui-component-library
/
src
/
components
/
abstractions
/
BundleProduct
/
CheckoutCartBundle
/
ProductItem
/
styled.tsx
|
---|
import { styled } from 'view-container'
import {
ImagePlaceholder,
RectanglePlaceholder,
TextPlaceholder,
} from 'atoms/Placeholder'
const ProductImage = styled.div `
align-self: flex-start;
`
const CheckoutProductImage = styled.withComponent(ProductImage) `
flex: 0 0 158px;
margin-right: 30px;
align-self: flex-start;
svg {
width: 100%;
}
@tablet-or-smaller() {
flex: 0 0 118px;
}
@phone-or-smaller() {
flex: 0 0 112px;
margin-right: 16px;
}
`
const StyledImagePlaceholder = styled.withComponent(ImagePlaceholder) ``
const ProductDetails = styled.div `
display: flex;
flex-direction: column;
flex: 1;
`
const BrandNamePlaceholder = styled.withComponent(TextPlaceholder) `
margin-bottom: 8px;
`
const ProductOptions = styled.div `
display: flex;
flex-direction: column;
margin: 8px 0;
`
const StyledTextPlaceholder = styled.withComponent(TextPlaceholder) `
width: 100px;
height: 15px;
margin-bottom: 4px;
&:last-child {
margin-bottom: none;
}
`
const ProductPrice = styled.div ``
const PricePlaceholder = styled.withComponent(TextPlaceholder) `
width: 50px;
height: 20px;
margin-right: 16px;
`
const QuantityBox = styled.div `
display: flex;
flex: 0 0 20%;
justify-content: flex-end;
align-items: baseline;
@phone-or-smaller() {
flex: 0 0 calc(100% - 128px);
text-align: left;
margin-bottom: 8px;
}
`
const StyledRectanglePlaceholder = styled.withComponent(RectanglePlaceholder) `
width: 110px;
height: 44px;
@media (min-width: 768px) and (max-width: 1023px) {
width: 80px;
}
`
const ItemPriceBox = styled.withComponent(ProductPrice) `
display: flex;
flex-direction: column;
flex-basis: 20%;
align-items: flex-end;
@phone-or-smaller() {
flex: 0 0 calc(100% - 128px);
text-align: left;
flex-direction: row;
align-items: flex-start;
}
`
const StyledItemText = styled.withComponent(TextPlaceholder) `
width: 100px;
height: 15px;
margin: 0 8px 4px 0;
`
const TotalPriceBox = styled.div `
display: flex;
flex-direction: column;
flex-basis: 20%;
align-items: flex-end;
@phone-or-smaller() {
display: none;
}
`
const ProductBox = styled.div `
display: flex;
flex-direction: row;
flex: 1;
@phone-or-smaller() {
flex-basis: 100%;
margin-bottom: rem(8);
}
`
const BaseWrapper = styled.section `
display: flex;
flex-direction: row;
padding: rem(20) rem(8) rem(24) rem(8);
border-bottom: 1px solid #a6afc1;
@tablet-or-smaller() {
padding: rem(16) 0;
}
`
const Wrapper = styled.withComponent(BaseWrapper) `
@phone-or-smaller() {
flex-wrap: wrap;
justify-content: flex-end;
}
`
export {
ProductImage,
CheckoutProductImage,
StyledImagePlaceholder,
ProductDetails,
BrandNamePlaceholder,
ProductOptions,
StyledTextPlaceholder,
ProductBox,
ProductPrice,
PricePlaceholder,
StyledRectanglePlaceholder,
QuantityBox,
StyledItemText,
ItemPriceBox,
TotalPriceBox,
BaseWrapper,
Wrapper,
}