Files
tile-server/web/src/components/ui/MetricGrid.tsx
T
2026-09-21 03:53:15 +03:00

27 lines
572 B
TypeScript

import type { ReactNode } from "react";
import { AppListSection, AppListTile } from "../../ui";
export type MetricItem = {
label: string;
value: ReactNode;
warn?: boolean;
};
type Props = {
items: MetricItem[];
};
export function MetricGrid({ items }: Props) {
return (
<AppListSection header="Сводка">
{items.map((item) => (
<AppListTile
key={item.label}
title={item.label}
value={<span className={item.warn ? "is-warn" : undefined}>{item.value}</span>}
/>
))}
</AppListSection>
);
}