You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
664 B
25 lines
664 B
export interface ModalProps {
|
|
title: string;
|
|
actions?: JSX.Element[];
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export const Modal = ({
|
|
title,
|
|
actions,
|
|
children,
|
|
}: ModalProps): JSX.Element => {
|
|
return (
|
|
<div className="rounded-md overflow-hidden w-full">
|
|
<div className="flex h-12 px-3 bg-slate-200 dark:bg-slate-700 justify-between">
|
|
<h2 className="my-auto font-semibold text-lg">{title}</h2>
|
|
{actions && (
|
|
<div className="my-auto">{actions.map((action) => action)}</div>
|
|
)}
|
|
</div>
|
|
<div className="h-full border border-slate-200 dark:border-slate-700">
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|