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-6.0.1.pre.alpha5 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.0.1.pre.alpha4 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.0.1.pre.alpha3 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.0.1.pre.alpha2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha15 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha14 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha13 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.0.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha12 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-6.0.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha11 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.5.1.pre.alpha4 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.5.1.pre.alpha3 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.5.1.pre.alpha2 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.5.1.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha10 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.5.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.5.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.5.0.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
playbook_ui-5.2.0.pre.alpha9 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx