Spaces:
Build error
Build error
File size: 752 Bytes
b59aa07 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
import React, { ReactNode } from "react";
import { ModalBackdrop } from "#/components/shared/modals/modal-backdrop";
interface ApiKeyModalBaseProps {
isOpen: boolean;
title: string;
width?: string;
children: ReactNode;
footer: ReactNode;
}
export function ApiKeyModalBase({
isOpen,
title,
width = "500px",
children,
footer,
}: ApiKeyModalBaseProps) {
if (!isOpen) return null;
return (
<ModalBackdrop>
<div
className="bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-tertiary"
style={{ width }}
>
<h3 className="text-xl font-bold">{title}</h3>
{children}
<div className="w-full flex gap-2 mt-2">{footer}</div>
</div>
</ModalBackdrop>
);
}
|