/* @flow */ import React from 'react' import classnames from 'classnames' import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props' import { globalProps } from '../utilities/globalProps.js' import Body from '../pb_body/_body' import Caption from '../pb_caption/_caption' import Flex from '../pb_flex/_flex' import IconCircle from '../pb_icon_circle/_icon_circle' import Title from '../pb_title/_title' type IconStatValueProps = { aria?: object, className?: string, data?: object, icon: string, id?: string, orientation?: "vertical" | "horizontal", size?: "sm" | "md" | "lg", text?: string, unit?: string, value: number, variant?: "default" | "royal" | "blue" | "purple" | "teal" | "red" | "yellow" | "green", } const IconStatValue = (props: IconStatValueProps) => { const { aria = {}, className, data = {}, icon, id, orientation = 'horizontal', size = 'sm', text = '', unit = '', value = 0, variant = 'default', } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const classes = classnames( buildCss('pb_icon_stat_value_kit', orientation, size, variant), globalProps(props), className ) const titleSize = function(size) { if (size == 'lg') { return (