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