import { ReactNode } from 'react'; import clsx from 'clsx'; import { Icon, IconProps } from '@/react/components/Icon'; import { pluralize } from '@/portainer/helpers/strings'; interface Props extends IconProps { value?: number; type: string; children?: ReactNode; } export function DashboardItem({ value, icon, type, children }: Props) { return (
{typeof value !== 'undefined' ? value : '-'}
{pluralize(value || 0, type)}
{children}
); }