Repository URL to install this package:
|
Version:
0.14.1 ▾
|
import { styled } from 'styleh-components'
import {
TextPlaceholder,
RectanglePlaceholder,
ImagePlaceholder,
} from 'atoms/Placeholder'
const StyledItemText = styled.withComponent(TextPlaceholder) `
width: rem(100);
height: rem(15);
margin-bottom: rem(4);
@phone-or-smaller() {
&:first-child {
margin-right: rem(8);
}
}
`
const StyledRectanglePlaceholder = styled.withComponent(RectanglePlaceholder) `
width: rem(110);
height: rem(44);
@tablet-or-smaller() {
width: rem(80);
}
@phone-or-smaller() {
margin-bottom: rem(8);
}
`
const StyledTextPlaceholder = styled.withComponent(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.withComponent(TextPlaceholder) `
margin-bottom: rem(8);
`
const ProductDetails = styled.div `
display: flex;
flex-direction: column;
flex: 1;
`
const StyledImagePlaceholder = styled.withComponent(ImagePlaceholder) ``
const StyledImage = 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 `
display: flex;
flex: 0 0 20%;
align-items: flex-end;
flex-direction: column;
@phone-or-smaller() {
align-items: flex-start;
padding-left: rem(120);
}
`
const PriceWrapper = styled.div `
display: flex;
flex: 0 0 20%;
align-items: flex-end;
flex-direction: column;
flex-wrap: wrap;
@phone-or-smaller() {
padding-left: rem(120);
align-items: flex-start;
flex-direction: row;
flex: 0 0 100%;
}
`
const QuantityWrapper = styled.div `
display: flex;
flex: 0 0 20%;
justify-content: flex-end;
align-items: baseline;
@phone-or-smaller() {
padding-left: rem(120);
justify-content: flex-start;
flex: 0 0 100%;
}
`
const ProductWrapper = styled.div `
display: flex;
flex: 1;
flex-direction: row;
@phone-or-smaller() {
flex-basis: 100%;
margin-bottom: rem(8);
}
`
const Wrapper = styled.div `
display: flex;
flex-direction: row;
@phone-or-smaller() {
flex-direction: column;
}
`
export {
StyledItemText,
StyledRectanglePlaceholder,
StyledTextPlaceholder,
ProductOptions,
BrandNamePlaceholder,
ProductDetails,
StyledImage,
StyledImagePlaceholder,
TotalPriceWrapper,
PriceWrapper,
QuantityWrapper,
ProductWrapper,
Wrapper,
}