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 { StyledLabel } from 'src/inputs/TextBox'
import { userSelect } from 'src/styles'
import { Button } from 'src/components/atoms/Button'
import { media } from '@skava/styleh-toolset'

const StyledButton = styled(Button)`
  height: rem(44);
  border-radius: rem(4);
  color: var(--color-pure-white);
  font-weight: 500;
  font-size: rem(18);
  text-transform: capitalize;
`

const StyledCancel = styled(StyledButton)`
  background-color: var(--color-light-grey);
  width: rem(162);
  ${media.tabletOrSmaller`
    width: rem(150);
  `} ${media.phoneOrSmaller`
    width: 50%;
  `};
`

const StyledSubmitButton = styled(StyledButton)`
  background-color: var(--color-blue);
  width: rem(264);
  ${props =>
    props.isValidForm === false &&
    styled.css`
      background-color: var(--color-pure-white);
      border: 1px solid var(--color-blue);
      color: var(--color-light-grey);
      cursor: not-allowed;
    `}
  ${media.tabletOrSmaller`
    width: rem(150);
  `}
  ${media.phoneOrSmaller`
    width: 50%;
    margin-right: rem(10);
  `}
`

const Wrapper = styled.section`
  .form-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    margin-left: -rem(4);
    margin-right: -rem(4);

    .button-group {
      display: flex;
      flex: 1;
      justify-content: space-between;
      padding: 0 rem(4);
    }

    .billing-address-wrapper {
      width: 100%;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;

      .form-item-wrapper {
        flex: 0 0 50%;
        padding: 0 rem(4);

        input::placeholder {
          font-style: italic;
        }

        ${media.tabletOrSmaller`
          flex: 0 0 100%;
        `} &.billing-address-heading {
          margin-bottom: rem(16);
          flex: 0 0 100%;
          font-size: rem(24);
          font-weight: 500;
          text-transform: capitalize;
        }

        &.state {
          flex: 0 0 30%;

          ${media.tabletOrSmaller`
            flex: 0 0 70%;
          `};
        }

        &.zip-code {
          flex: 0 0 20%;

          ${media.tabletOrSmaller`
            flex: 0 0 30%;
          `};
        }
      }
    }

    .form-item-wrapper {
      flex: 0 0 50%;
      padding: 0 rem(4);

      input::placeholder {
        font-style: italic;
      }

      ${media.tabletOrSmaller`
        flex: 0 0 100%;
      `} .input-show-password-icon {
        display: none;
      }

      &.card-number {
        flex: 0 0 30%;

        ${media.tabletOrSmaller`
          flex: 0 0 68%;
        `} ${media.phoneOrSmaller`
          flex: 0 0 100%;
        `};
      }

      &.card-month {
        flex: 0 0 10%;

        ${media.tabletOrSmaller`
          flex: 0 0 16%;
        `} ${media.phoneOrSmaller`
          flex: 0 0 50%;
        `};
      }

      &.card-expire-year {
        flex: 0 0 10%;

        ${media.tabletOrSmaller`
          flex: 0 0 16%;
        `} ${media.phoneOrSmaller`
          flex: 0 0 50%;
        `};
      }

      &.default-address {
        flex: 0 0 100%;
        width: 100%;
        margin: rem(8) 0 rem(18);
        align-items: baseline;

        label {
          @font (16, medium);
          color: var(--color-black);
          user-select: none;
          align-self: flex-start;
        }
        svg {
          width: rem(18);
          height: auto;
          border-radius: rem(2);
          ${userSelect('none')};

          .checkbox-tickfill {
            transform: scale(1.4, 1.4) translate(rem(20), rem(30));
          }
        }
      }

      ${StyledLabel} {
        display: flex;
        position: relative;
        margin-bottom: rem(8);
        top: 0;
        text-transform: capitalize;
        @font (16, regular);
        overflow: visible;
      }
    }
  }
`

export { Wrapper, StyledCancel, StyledSubmitButton }