Sha256: 1a7faece43c2fe06b6bbda7453551460ddc1a649278a3103cd81c0492c134e15

Contents?: true

Size: 1015 Bytes

Versions: 44

Compression:

Stored size: 1015 Bytes

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'
import { buildCss } from '../utilities/props'
import DateTime from '../pb_kit/dateTime.js'
import { spacing } from '../utilities/spacing.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), spacing(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

44 entries across 44 versions & 1 rubygems

Version Path
playbook_ui-5.2.0.pre.alpha8 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha7 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.3.0.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.4.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha6 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha5 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.3.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha4 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha3 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.1.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.0.3 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.0.2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.0.1.pre.beta app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.1.0.pre.alpha4 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.1.0.pre.alpha2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.1.0.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.0.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.0.1.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx