Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
import { styled } from 'styleh-components'
import { borderLine } from 'src/styles'
import {
  TextPlaceholder,
  RectanglePlaceholder,
  SquarePlaceholder,
} from 'atoms/Placeholder'

const Button = styled.div `
  grid-area: button;
  position: relative;
  display: flex;
  flex-direction: row;

  @media (max-width: 767px) {
    flex-direction: column;
  }
`

const Quantity = styled.div `
  grid-area: quantity;
  position: relative;
  padding-top: rem(16);
  padding-bottom: rem(32);
  align-self: flex-start;
  display: flex;

  &:before {
    ${borderLine};
    width: 70%;
    top: 0;
  }
  @phone-or-smaller() {
    padding-top: $spacing;
    padding-bottom: $spacing;
  }
`

const Rating = styled.div `
  grid-area: rating;
  position: relative;
  align-self: flex-start;
`

const Description = styled.div.attrs({
  'data-qa': 'qa-product-details',
}) `
  grid-area: description;
  position: relative;
  padding-bottom: rem(24);
  align-self: flex-start;

  &:after {
    ${borderLine};
    width: 70%;
  }
  @phone-or-smaller() {
    margin-bottom: rem(24);
    margin-top: 1rem;
  }
`

const ProductOptions = styled.div `
  grid-area: facetItem;
  position: relative;
`

const ProductSection = styled.div `
  grid-area: productItem;
`

const ProductItemContainer = styled.div `
  display: grid;
  grid-column-gap: rem(60);
  grid-template-columns: 298px 1fr 1fr;
  grid-template-areas:
    'productItem facetItem description'
    'productItem facetItem rating'
    'productItem facetItem quantity'
    'productItem facetItem button';

  @tablet-or-smaller() {
    grid-template-columns: 230px 1fr;
    grid-template-areas:
      'productItem facetItem'
      'productItem description'
      'productItem rating'
      'productItem quantity'
      'productItem button';
  }

  @phone-or-smaller() {
    grid-template-columns: repeat(1, 1fr);
    grid-template-areas:
      'productItem'
      'description'
      'facetItem'
      'rating'
      'quantity'
      'button';
  }
`

const ProductItemWrapper = styled.section `
  width: 100%;
  border-top: 1px solid #a6afc1;
  padding: rem(35) 0 rem(30) 0;
  position: relative;

  @tablet-or-smaller() {
    padding: rem(28) 0;
  }
`

const StyledTextPlaceholder = styled.withComponent(TextPlaceholder) `
  display: block;
  margin-bottom: rem(8);
`

const ProductDetailsPlaceholder = styled.withComponent(TextPlaceholder) `
  display: block;
  margin-bottom: rem(8);
`

const StyledRectanglePlaceholder = styled.withComponent(TextPlaceholder) `
  margin-bottom: rem(8);
`
const ProductOptionsWrapper = styled.div `
  padding: rem(16) 0;
  position: relative;

  &:first-child {
    padding-top: 0;
  }
  &:after {
    ${borderLine};
    width: 70%;
  }
  @tablet-or-larger() {
    &:last-child:after {
      content: '';
      display: none;
    }
  }
`
const StyledColorPlaceholder = styled.withComponent(SquarePlaceholder) `
  margin-right: rem(16);
`
export {
  ProductItemContainer,
  ProductItemWrapper,
  ProductSection,
  ProductOptions,
  Description,
  Button,
  Quantity,
  StyledTextPlaceholder,
  ProductDetailsPlaceholder,
  StyledRectanglePlaceholder,
  StyledColorPlaceholder,
  ProductOptionsWrapper,
  Rating,
}