4.1.0 • Published 4 years ago
@augustindev/modal v4.1.0
@augustindev/modal
Composant Modal create with React.
Installation and usage
install package npm.
yarn add @augustindev/modal
Then use it in your app :
With React Component
import React, { useState } from 'react'
import { Modal } from "@augustindev/modal/dist"
export default function App() {
const [stateModal, setStateModal] = useState(false)
return (
<Modal content='Text modale' show={stateModal} onClose={() => setStateModal(false)} />
)
}Props
content- Text show in Modalshow- State Modal (Show/Hide).onClose- Callback function when user click on close button.