add details button on overview
This commit is contained in:
25
apps/dashboard/src/modals/OverviewChartDetails.tsx
Normal file
25
apps/dashboard/src/modals/OverviewChartDetails.tsx
Normal 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;
|
||||
@@ -62,6 +62,9 @@ const modals = {
|
||||
DateRangerPicker: dynamic(() => import('./DateRangerPicker'), {
|
||||
loading: Loading,
|
||||
}),
|
||||
OverviewChartDetails: dynamic(() => import('./OverviewChartDetails'), {
|
||||
loading: Loading,
|
||||
}),
|
||||
};
|
||||
|
||||
export const {
|
||||
|
||||
Reference in New Issue
Block a user