Sha256: 3f89a638c77e6bf01a32f1d70f16a40077b82753cf242e79c0f781c5b6eb35a8

Contents?: true

Size: 1.61 KB

Versions: 112

Compression:

Stored size: 1.61 KB

Contents

import React from 'react'
import classnames from 'classnames'

import { buildCss, buildDataProps } from '../utilities/props'
import { globalProps } from '../utilities/globalProps'

import Body from '../pb_body/_body'
import Flex from '../pb_flex/_flex'
import FlexItem from '../pb_flex/_flex_item'
import DateYearStacked from '../pb_date_year_stacked/_date_year_stacked'
import Icon from '../pb_icon/_icon'

type DateRangeStackedProps = {
  className?: string | string[],
  data?: string,
  dark?: boolean,
  endDate: Date,
  id?: string,
  startDate: Date,
}

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

  return (
    <div {...dataProps}
        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

112 entries across 112 versions & 1 rubygems

Version Path
playbook_ui-13.12.0.pre.alpha.PLAY880cardkithighlightzindex1655 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1627 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1626 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1624 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1623 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1612 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1611 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1609 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1608 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1581 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1580 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1579 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1093typeaheadkitdocbug1577 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.play1051testhighcharts1574 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.play1051highchartstest1567 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.play1051highchartstest1558 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.play1051highchartstest1556 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.PLAY1051removinghighchartsdependency1551 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1550 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1543 app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx