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 { Button } from 'atoms/Button'
import { InformationCard } from 'organisms/InformationCard'
import { HeaderWrapper as Header } from 'abstractions/Subscription/ShippingAddressCard'
import {
  AddressWrapper,
  Name,
  AddressLine1,
  AddressLine2,
  City,
  Country,
  State,
  ZipCode,
  PhysicalAddress,
} from 'molecules/PhysicalAddress'

const HeaderWrapper = styled.withComponent(Header) `
  margin-bottom: rem(24);
  text-transform: capitalize;

  @phone-or-smaller() {
    margin-bottom: rem(16);
  }
`

const HeaderContent = styled.div.attrs({
  'data-qa': 'qa-shipping-address',
}) `
  font-size: rem(20);
  font-weight: 700;

  @tablet-or-smaller() {
    font-size: rem(18);
  }
`

const HeaderToggleButton = styled.withComponent(Button).attrs({
  'data-qa': 'qa-new-shipping-address',
}) `
  color: #159fd5;
  background: none;
  border: none;
  padding: 0;
  font-size: rem(18);
  text-transform: capitalize;
  @tablet-or-smaller() {
    font-size: rem(16);
    justify-content: left;
    margin-top: $spacing;
  }
`

const StyledInformationCard = styled.withComponent(InformationCard) `
  padding: 0;

  ${Name},
  ${AddressLine1},
  ${AddressLine2},
  ${City},
  ${State},
  ${Country} {
    font-size: rem(18);

    @phone-or-smaller() {
      font-size: rem(16);
    }
  }

  ${Name} {
    font-weight: 700;
  }
`

const StyledPhysicalAddress = styled.withComponent(PhysicalAddress) `
  ${Name},
  ${AddressLine1},
  ${AddressLine2},
  ${City},
  ${State},
  ${Country} {
    font-size: rem(18);

    @phone-or-smaller() {
      font-size: rem(16);
    }
  }

  ${Name} {
    font-weight: 700;
  }
`

const ItemWrapper = styled.div.attrs({
  'data-qa': 'qa-address-details',
}) `
  border: rem(1) solid #5f6c88;
  border-radius: rem(4);
  margin-bottom: rem(16);
  padding: rem(16);

  ${props =>
    props.isDefaultAddress &&
    styled.css `
      border-color: #159fd5;
      border-width: rem(3);
    `};
`

export {
  HeaderWrapper,
  HeaderContent,
  HeaderToggleButton,
  StyledInformationCard,
  StyledPhysicalAddress,
  ItemWrapper,
}