import { Text } from "@allurereport/web-components"; import { clsx } from "clsx"; import type { FunctionalComponent } from "preact"; import * as styles from "./styles.scss"; export type MetadataProps = { count?: number; title?: string; type?: string; status?: string; }; export const MetadataValue: FunctionalComponent = ({ count }) => { return ( {count} ); }; interface ReportMetadataItemProps { className?: string; renderComponent?: FunctionalComponent; props?: MetadataProps; } const MetadataItem: FunctionalComponent = ({ className, renderComponent: RenderComponent = MetadataValue, props, ...rest }) => { const { title } = props || {}; return (
{title} {RenderComponent ? : }
); }; export default MetadataItem;