Sha256: 483a62f74760f93035fd4b0e7c4a143762be7b54658c4313d5349e6b4ee9aa88

Contents?: true

Size: 1.36 KB

Versions: 44

Compression:

Stored size: 1.36 KB

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'
import { buildCss } from '../utilities/props'
import { spacing } from '../utilities/spacing.js'

import { Body, DateYearStacked, Flex, FlexItem, Icon } from '../'

type DateRangeStackedProps = {
  className?: String | Array<String>,
  data?: String,
  dark?: Boolean,
  endDate: String,
  id?: String,
  startDate: String,
}

const DateRangeStacked = (props: DateRangeStackedProps) => {
  const { className, dark = false, endDate, startDate } = props
  const css = classnames(className, buildCss('pb_date_range_stacked'), spacing(props))

  return (
    <div className={css}>
      <Flex vertical="center">
        <FlexItem>
          <DateYearStacked
              align="right"
              dark={dark}
              date={startDate}
          />
        </FlexItem>
        <FlexItem>
          <div>
            <Body
                color="light"
                tag="span"
            >
              <Icon
                  className="pb_date_range_stacked_arrow"
                  fixedWidth
                  icon="long-arrow-right"
              />
            </Body>
          </div>
        </FlexItem>
        <FlexItem>
          <DateYearStacked
              dark={dark}
              date={endDate}
          />
        </FlexItem>
      </Flex>
    </div>
  )
}

export default DateRangeStacked

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
playbook_ui-6.0.1.pre.alpha5 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-6.0.1.pre.alpha4 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-6.0.1.pre.alpha3 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-6.0.1.pre.alpha2 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.2.0.pre.alpha15 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.2.0.pre.alpha14 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.2.0.pre.alpha13 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-6.0.1 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.2.0.pre.alpha12 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-6.0.0 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.2.0.pre.alpha11 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.5.1.pre.alpha4 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.5.1.pre.alpha3 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.5.1.pre.alpha2 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.5.1.pre.alpha1 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.2.0.pre.alpha10 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.5.1 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.5.0 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.5.0.pre.alpha1 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx
playbook_ui-5.2.0.pre.alpha9 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx