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 'view-container'
import {
  Order,
  PaymentSummaryContainer,
  FooterContainer,
} from 'abstractions/Order'
import {
  PaymentSummaryPanelSectionLeft,
  PaymentSummaryPanelSectionRight,
  PaymentSummaryPanel,
  StyledActionButtonGroup
} from 'abstractions/Order/PaymentSummary'
import {PaymentSummary, StyledProductOrderSummary} from './PaymentSummary'
import ProductItemList from './ProductItemList'
import ActionButtonGroup, { SectionWrapper } from './ActionButtonGroup'
import OrderStatus from './OrderStatus'
import { PrimaryButton, SecondaryButton } from 'presets/Buttons'

const StyledPaymentSummary = PaymentSummary

const StyledOrderStatus = styled.withComponent(OrderStatus)`
  border-bottom: 1px solid #ccc;
  padding: rem(16);

  @phone-or-smaller() {
    padding: rem(16) rem(8);
  }

  ${props =>
    props.state.isExpanded &&
    styled.css`
      svg {
        transform: rotate(180deg);
      }
    `}
`

const StyledProductItemList = styled.withComponent(ProductItemList)`
  padding-bottom: rem(16);
  flex: 0 0 60%;

  ${props =>
    props.state.isExpanded &&
    styled.css`
      flex: 0 0 100%;
    `}

  @media(min-width: 768px) and (max-width: 1023px) {
    flex: 0 0 60%;

    ${props =>
    props.state.isExpanded &&
    styled.css`
        flex: 0 0 100%;
      `}
  }
`

const StyledOrder = styled.withComponent(Order)`

  ${props => props.isSubscriptionItem && styled.css`
    ${PaymentSummaryPanelSectionLeft}, ${PaymentSummaryPanelSectionRight} {
      flex: 0 0 100%;
    }

    ${PaymentSummaryPanel} {
      flex: 0 0 100%;
    }

    ${StyledActionButtonGroup} {
      display: none;
    }

    ${StyledProductOrderSummary} {
      border-top: solid 1px #ccc;
      max-width: 100%;
      padding-top: rem(16);
    }
  `}

  ${FooterContainer} {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
    padding: rem(24) rem(16) rem(16);

    ${SectionWrapper} {
      flex: 0 0 40%;
      flex-direction: column;
      justify-content: flex-end;

      @phone-or-smaller() {
        padding-top: rem(24);
      }
    }

    @media(max-width: 767px) {
      ${StyledProductItemList}, ${SectionWrapper} {
        flex: 0 0 100%;
      }
    }
  }
  ${PaymentSummaryContainer} {
    padding: 16px 16px 0;

    @media (max-width: 767px) {
      padding: 16px 8px 0px;
    }
  }
`

const StyledPrimaryButton = styled.withComponent(PrimaryButton)`
  margin-bottom: rem(16);
`

const StyledSecondaryButton = styled.withComponent(SecondaryButton)`
  margin-bottom: rem(16);
`

export {
  StyledOrderStatus,
  StyledPaymentSummary,
  StyledProductItemList,
  StyledOrder,
  StyledPrimaryButton,
  StyledSecondaryButton,
}