import { PropsWithChildren } from 'react'; import { cloneElement } from 'utils/cloneElement'; interface OverviewInfoProps { label: string; icon: React.ReactNode; } export const OverviewInfo = ({ label, icon, children, }: PropsWithChildren) => { const styledIcon = cloneElement({ element: icon, className: 'w-4 h-4', }); return (
{styledIcon} {label}
{children}
); };