multiple breakpoints

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-06-20 23:25:18 +02:00
parent c07f0d302c
commit cf8617e809
48 changed files with 908 additions and 432 deletions

View File

@@ -1,13 +1,14 @@
import { parseAsStringEnum, useQueryState } from 'nuqs';
import { mapKeys } from '@openpanel/validation';
import type { IChartProps } from '@openpanel/validation';
import type { IChartRoot } from '../report/chart';
export function useOverviewWidget<T extends string>(
key: string,
widgets: Record<
T,
{ title: string; btn: string; chart: IChartProps; hide?: boolean }
{ title: string; btn: string; chart: IChartRoot; hide?: boolean }
>
) {
const keys = Object.keys(widgets) as T[];