Sha256: dd733095a480fd41b1f8ad22b92bc98c38bfa7c8d445fc9ec951e8c4833a88f2

Contents?: true

Size: 1 KB

Versions: 37

Compression:

Stored size: 1 KB

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'
import { buildCss } from '../utilities/props'
import DateTime from '../pb_kit/dateTime.js'
import { globalProps } from '../utilities/globalProps.js'

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

type DateYearStackedProps = {
  align?: "left" | "center" | "right",
  className?: string | array<string>,
  dark?: boolean,
  data?: string,
  date: string,
  id?: string,
}

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

  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

37 entries across 37 versions & 1 rubygems

Version Path
playbook_ui-7.3.0.pre.alpha2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.7.0.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.7.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.6.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.0.pre.alpha10 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.6.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.5.2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha12 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha11 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha10 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha9 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.5.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.5.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha8 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha7 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha6 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha5 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha4 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha3 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-7.0.1.pre.alpha2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx