Skip to main content

Modal

img

Usage​

This props inherits all the div properties from HTML

import React from 'react'
import {
Modal,
DialogTitle,
DialogContent,
DialogActions,
Button,
} from 'qdm-component-library'

function App() {
const [modal, setmodal] = useState(false)

const HandleModal = () => {
setmodal(!modal)
}

return (
<Modal open={modal} onClose={() => HandleModal()}>
<DialogTitle onClose={() => HandleModal()}>Subscribe</DialogTitle>
<DialogContent>{data}</DialogContent>
<DialogActions>
<Button
onClick={(evt) => {
HandleModal()
}}
size="medium"
name={'Cancel'}
/>
</DialogActions>
</Modal>
)
}
export default App

Reference​

Props for DialogActions​

className​

props for providing classname to DialogActions component string

id​

props for providing id to DialogActions component string

name​

props for providing name to DialogActions component string

children​

props for providing children for DialogActions Component React Node

inLineStyles​

props give addition props to the DialogActions Component type Object


Props for DialogContent​

className​

props for providing classname to DialogContent component string

id​

props for providing id to DialogContent component string

name​

props for providing name to DialogContent component string

children​

props for providing children for DialogContent Component React Node

inLineStyles​

props give addition props to the DialogContent Component type Object


Props for DialogTitle​

className​

props for providing classname to DialogTitle component string

id​

props for providing id to DialogTitle component string

name​

props for providing name to DialogTitle component string

children​

props for providing children for DialogTitle Component React Node

inLineStyles​

props give addition props to the DialogTitle Component type Object


Props for Modal​

open​

props for open the Modal Component boolean

className​

props for providing classname to Modal component string

id​

props for providing id to Modal component string

name​

props for providing name to Modal component string

children​

props for providing children for Modal Component React Node

inLineStyles​

props give addition props to the Modal Component type Object