Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / pass / components / Layout / Panel / ItemHistoryPanel.tsx
blob71daa7c7ee0697c69664847a0abd00984a2d927f
1 import type { PropsWithChildren, ReactNode } from 'react';
2 import { type FC, type ReactElement } from 'react';
4 import { itemTypeToSubThemeClassName } from '@proton/pass/components/Layout/Theme/types';
5 import { type ItemType } from '@proton/pass/types';
6 import clsx from '@proton/utils/clsx';
8 import { Panel } from './Panel';
9 import { PanelHeader } from './PanelHeader';
11 type Props = {
12     actions?: ReactElement[];
13     footer?: ReactNode;
14     title: ReactNode;
15     type: ItemType;
18 export const ItemHistoryPanel: FC<PropsWithChildren<Props>> = ({ children, actions, footer, title, type }) => (
19     <Panel
20         className={clsx(itemTypeToSubThemeClassName[type], 'relative')}
21         header={<PanelHeader title={title} actions={actions} />}
22         footer={footer}
23     >
24         {children}
25     </Panel>