/* @flow */ import React from 'react' import classnames from 'classnames' import DateTime from '../pb_kit/dateTime.js' import { buildAriaProps, buildDataProps } from '../utilities/props' import { Body, Caption, Flex, Icon, Title } from '../' import { spacing } from '../utilities/spacing.js' type LabelValueProps = { aria?: object, className?: String, dark?: Boolean, data?: object, id?: String, label: String, value?: String, variant?: "default" | "details", icon?: String, description?: String, title?: String, date?: Date, active?: Boolean } const dateString = (value: DateTime) => { const month = value.toMonthNum() const day = value.toDay() return ` ยท ${month}/${day}` } const LabelValue = (props: LabelValueProps) => { const { active = false, aria = {}, className, dark = false, data = {}, date, description, icon, id, label, title, value, variant = 'default', } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const formattedDate = new DateTime({ value: date }) const themeStyle = dark === true ? '_dark' : '' const css = classnames( ['pb_label_value_kit' + themeStyle, className], spacing(props) ) return (