function InaccessibleButtonWithModal() {
const [isOpen, setIsOpen] = React.useState(false);
return (
<React.Fragment>
<div onClick={() => setIsOpen(!isOpen)}>Toggle modal</div>
<Modal isOpen={isOpen} onClose={() => setIsOpen(false)} />
</React.Fragment>
);
}
‚Äč
export default InaccessibleButtonWithModal;