📅  最后修改于: 2022-03-11 15:00:12.789000             🧑  作者: Mango
//dependencies
const { render } = ReactDOM,
{ useState } = React,
{ Popper, Button, Paper, ClickAwayListener } = MaterialUI
//custom popper
const MyPopper = ({isOpen,clickAwayHandler}) => (
There goes my custom popper
)
//main page
const MainPage = () => {
const [isOpen, setIsOpen] = useState(true),
clickAwayHandler = () => setIsOpen(false),
clickHandler = () => setIsOpen(true)
return (
{
isOpen &&
}
)
}
//render
render (
,
document.getElementById('root')
)