// @flow strict import * as React from 'react'; import type {AlertSemanticType} from '../../types/common'; import classify from '../../utils/classify'; import type {IconSize, IconType} from '../Icon'; import {SemanticIcon} from '../Icon'; import css from './KPIBox.module.css'; type ClassNames = $ReadOnly<{ wrapper?: string, topFoldContent?: string, middleFoldContent?: string, bottomFoldContent?: string, }>; export type KPIBoxProps = { classNames?: ClassNames, semantic?: AlertSemanticType, topContent?: React.Node, middleContent?: React.Node, bottomContent?: React.Node, iconName?: string, iconSize?: IconSize, iconType?: IconType, ... }; export const KPIBox: React$AbstractComponent = React.forwardRef( ( { classNames, semantic = 'neutral', topContent, middleContent, bottomContent, iconName, iconSize = 'large', iconType = 'solid', ...props }: KPIBoxProps, ref, ) => (
{!!iconName && ( )}
{!!topContent && (
{topContent}
)} {!!middleContent && (
{middleContent}
)} {!!bottomContent && (
{bottomContent}
)}
), );