add details button on overview

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-05-20 09:45:30 +02:00
parent 4a7f21663f
commit 4350670bbc
13 changed files with 79 additions and 9 deletions

View File

@@ -0,0 +1,25 @@
import { ChartSwitch } from '@/components/report/chart';
import { ScrollArea } from '@/components/ui/scroll-area';
import type { IChartInput } from '@openpanel/validation';
import { ModalContent, ModalHeader } from './Modal/Container';
type Props = {
chart: IChartInput;
};
const OverviewChartDetails = (props: Props) => {
return (
<ModalContent>
<ModalHeader title={props.chart.name} />
<ScrollArea className="-m-6 max-h-[calc(100vh-200px)]">
<div className="p-6">
<ChartSwitch {...props.chart} limit={999} chartType="bar" />
</div>
</ScrollArea>
</ModalContent>
);
};
export default OverviewChartDetails;

View File

@@ -62,6 +62,9 @@ const modals = {
DateRangerPicker: dynamic(() => import('./DateRangerPicker'), {
loading: Loading,
}),
OverviewChartDetails: dynamic(() => import('./OverviewChartDetails'), {
loading: Loading,
}),
};
export const {