feat: Modal confirm modal info

:%s
This commit is contained in:
unknown
2021-08-30 13:41:45 +07:00
parent e0ccff890d
commit d9e0cc248f
7 changed files with 79 additions and 125 deletions

View File

@@ -2,7 +2,7 @@ import React, { useRef } from 'react'
import { Close } from 'src/components/icons'
import { useOnClickOutside } from 'src/utils/useClickOutSide'
import s from './ModalCommon.module.scss'
interface Props {
export interface ModalCommonProps {
onClose: () => void
visible: boolean
children: React.ReactNode
@@ -10,7 +10,7 @@ interface Props {
maxWidth?:string
}
const ModalCommon = ({ onClose, visible, children, title="Modal",maxWidth }: Props) => {
const ModalCommon = ({ onClose, visible, children, title="Modal",maxWidth }: ModalCommonProps) => {
const modalRef = useRef<HTMLDivElement>(null)
const clickOutSide = () => {
onClose && onClose()