Sha256: d5d441fd58239dc60e25ff8e3df93f398921e2f744eab6ccb1015a0238e81cdb

Contents?: true

Size: 904 Bytes

Versions: 35

Compression:

Stored size: 904 Bytes

Contents

/* @flow */

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

import { buildCss } from '../utilities/props'
import DateTime from '../pb_kit/dateTime.js'

import {
  Body,
  Title,
} from '../'

type DateYearStackedProps = {
  align?: 'center' | 'right',
  className?: String | Array<String>,
  dark?: Boolean,
  data?: String,
  date: String,
  id?: String,
}

const DateYearStacked = ({
  align,
  className,
  dark = false,
  date,
}: DateYearStackedProps) => {
  const dateTimestamp = new DateTime({ value: date })
  const css = classnames(className, buildCss('pb_date_year_stacked', align))

  return (
    <div className={css}>
      <Title
          dark={dark}
          size={4}
          text={`${dateTimestamp.toDay()} ${dateTimestamp.toMonth().toUpperCase()}`}
      />
      <Body color="light">{ dateTimestamp.toYear() }</Body>
    </div>
  )
}

export default DateYearStacked

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
playbook_ui-4.14.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.15.1.alpha1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.13.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.13.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.12.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.11.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.11.0.pre.alpha3 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.11.0.pre.alpha.pre.2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.10.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.10.0.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.9.0.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.9.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.8.2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.8.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.7.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.7.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.6.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.6.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.5.2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-4.5.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx