import { Icon } from './Icon.jsx'

export const Popup = ({ title, children, onClose }) => {
    return (
        <div class="popup-container">
            <div class="popup">
                <div class="header">
                    <div class="title">{title}</div>
                    <button class="flat icon" onClick={onClose}>
                        <Icon name="close" />
                    </button>
                </div>
                <div class="content">{children}</div>
            </div>
        </div>
    )
}
