import React, { useState } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import Footer from './Footer'; import Body from './Body'; import Header from './Header'; import { useEffect } from 'react'; const Dialog = ({ title, text, onClose, noCloseButton, actions, onShow, onSubmit, header: HeaderComponent = Header, body: BodyComponent = Body, footer: FooterComponent = Footer, value: defaultValue = {}, }) => { const [value, setValue] = useState(defaultValue); const theme = 'bg-primary-dark'; const flex = 'flex flex-col'; const border = 'border-0 rounded'; const outline = 'outline-none focus:outline-none'; const position = 'relative'; const width = 'w-full'; const padding = 'px-[20px] pb-[20px] pt-[13px]'; useEffect(() => { if (onShow) { onShow(); } }, [onShow]); return (