mdbootstrap / TW-Elements-React

TW Elements for React - 𝙃𝙪𝙜𝙚 collection of Tailwind + React components, sections and templates 😎
https://tw-elements.com/docs/react/
MIT License
139 stars 27 forks source link

Rework `open` / `setOpen` methods in components #152

Open juujisai opened 11 months ago

juujisai commented 11 months ago

Example:

const [isOpen, setIsOpen] = useState(false)

return (
  <TWEModal open={isOpen} onOpen={() => setIsOpen(true)} onClose={() => setIsOpen(false)}
)

setOpen should not be passed to the component