import classNames from "classnames"; import classes from "./classes.module.scss"; import Button, { EButtonStyleType, EButtonVariant } from "../Button"; import React from "react"; import Typography, { ETypo } from "../Typography"; import { XMarkIcon } from "@heroicons/react/24/outline"; import IconButton, { EIconButtonVariant } from "../IconButton"; type IProps = { className?: string; isOpen: boolean; onClose?: () => void; children?: React.ReactNode; title?: string; firstButton?: { text: string; onClick?: () => void; rightIcon?: React.ReactNode; leftIcon?: React.ReactNode; }; secondButton?: { text: string; onClick?: () => void; rightIcon?: React.ReactNode; leftIcon?: React.ReactNode; }; fullwidth?: boolean; fullscreen?: boolean; }; export default function Modal(props: IProps) { const { isOpen, onClose, children, className, title, firstButton, secondButton, fullwidth, fullscreen } = props; if (!isOpen) return null; return (
{title && {title}} }/>
{children}
{firstButton && ( )} {secondButton && ( )}
); }