/* * Copyright (c) 2022 @automata-network/wallet-sdk authors and contributors. * This software may be modified and distributed under the terms of UNLICENSED * license. Refer to the LICENSE file for details. */ import React, { PropsWithChildren } from 'react' import { Modal as ReactResponsiveModal, ModalProps as ReactResponsiveModalProps } from 'react-responsive-modal' import { useWallet } from '../../store/wallet' interface ModalProps extends ReactResponsiveModalProps { title?: string } export const Modal: React.FC> = (props) => { const { prefixCls } = useWallet() const { classNames, title, children, ...restProps } = props const { root, modal, closeIcon, ...restClassName } = classNames || {} return (
{title ?
{title}
: null}
{children}
) }