1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 17:54:53 +01:00
market/src/components/atoms/BaseDialog.tsx

36 lines
663 B
TypeScript

import React, { ReactNode, ReactElement } from 'react'
import styles from './BaseDialog.module.css'
import { Modal } from 'react-responsive-modal'
export default function BaseDialog({
open,
title,
onClose,
children,
disableClose,
actions,
...other
}: {
open: boolean
title: string
onClose: () => void
children: ReactNode
disableClose?: boolean
actions?: any
}): ReactElement {
return (
<Modal
open={open}
onClose={onClose}
classNames={{
overlay: styles.customOverlay,
modal: styles.customModal
}}
{...other}
>
<h2>{title}</h2>
<div>{children}</div>
</Modal>
)
}