Skip to content

Instantly share code, notes, and snippets.

@CITGuru
Created June 29, 2019 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CITGuru/977e25d8d1608573483a51a26ed17ff8 to your computer and use it in GitHub Desktop.
Save CITGuru/977e25d8d1608573483a51a26ed17ff8 to your computer and use it in GitHub Desktop.
const App = ()=>{
const [itemModalOpen, setItemModalOpen, toggleModal] = useModal()
return (
<div className="App">
<button onClick={toggleModal}>Show Modal</button>
<CustomModal
title="Item Modal"
isActive={itemModalOpen}
handleClose={() => setItemModalOpen(false)}
>
{...children} </CustomModal>
</div>
)
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment