// Copyright 2024, Command Line Inc. // SPDX-License-Identifier: Apache-2.0 import { Button } from "@/element/button"; import React from "react"; import "./modal.less"; interface ModalProps { id?: string; children: React.ReactNode; onClickOut: () => void; } function Modal({ children, onClickOut, id = "modal", ...otherProps }: ModalProps) { const handleOutsideClick = (e: React.SyntheticEvent) => { if (typeof onClickOut === "function" && (e.target as Element).className === "modal-container") { onClickOut(); } }; return (
{children}
); } interface ModalContentProps { children: React.ReactNode; } function ModalContent({ children }: ModalContentProps) { return
{children}
; } interface ModalHeaderProps { title: React.ReactNode; description?: string; } function ModalHeader({ title, description }: ModalHeaderProps) { return (
{typeof title === "string" ?

{title}

: title} {description &&

{description}

}
); } interface ModalFooterProps { children: React.ReactNode; } function ModalFooter({ children }: ModalFooterProps) { return ; } interface WaveModalProps { title: string; description?: string; id?: string; onSubmit: () => void; onCancel: () => void; buttonLabel?: string; children: React.ReactNode; } function WaveModal({ title, description, onSubmit, onCancel, buttonLabel = "Ok", children }: WaveModalProps) { return ( {children} ); } export { WaveModal };