Sha256: 309fbc1a1cf4122981359acb300a5a67ce6572f1fcb14d9c5ad36a6e621e357a

Contents?: true

Size: 1.12 KB

Versions: 243

Compression:

Stored size: 1.12 KB

Contents

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

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

import Body from '../pb_body/_body'
import Title from '../pb_title/_title'

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

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

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

243 entries across 243 versions & 1 rubygems

Version Path
playbook_ui-12.27.0.pre.alpha.expandednotworking853 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.27.0 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.1.pre.alpha.railsmultilevelimprovements842 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.1.pre.alpha.railsmultilevelimprovements837 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.1.pre.alpha.PLAY860PhoneNumInputOptions836 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.1.pre.alpha.railsmultilevelimprovements835 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.1.pre.alpha.play716popoverkitcloseonclickissue833 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.1.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown831 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.1 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.multiselectfixes825 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown822 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.multiselectfixes821 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown818 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown817 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown815 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown813 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.alphafix812 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.alphafix810 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.railsmultilevelimprovements805 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
playbook_ui-12.26.0.pre.alpha.multiselectfixes798 app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx