Sha256: b427096b4a983ac9cf134d36662eb949c99fcb18f39362b0c3efd2a702ed6016
Contents?: true
Size: 1.26 KB
Versions: 10
Compression:
Stored size: 1.26 KB
Contents
import React from 'react' import classnames from 'classnames' import { buildCss, buildDataProps, buildHtmlProps } from '../utilities/props' import { globalProps } from '../utilities/globalProps' import DateTime from '../pb_kit/dateTime'; 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: Date, htmlOptions?: {[key: string]: string | number | boolean | Function}, id?: string, } const DateYearStacked = (props: DateYearStackedProps) => { const { align = 'left', className, dark = false, date, data={}, htmlOptions = {}, } = props const css = classnames( buildCss('pb_date_year_stacked', align), globalProps(props), className ) const dataProps = buildDataProps(data) const htmlProps = buildHtmlProps(htmlOptions) return ( <div {...dataProps} {...htmlProps} className={css} > <Title dark={dark} size={4} text={`${DateTime.toDay(date)} ${DateTime.toMonth(date).toUpperCase()}`} /> <Body color="light">{DateTime.toYear(date)}</Body> </div> ) } export default DateYearStacked
Version data entries
10 entries across 10 versions & 1 rubygems