apeman-react-dialog
Version:
apeman react package for dialog component.
38 lines (35 loc) • 732 B
JSX
import React from 'react'
import {
ApDialog,
ApDialogHeader,
ApDialogBody,
ApDialogStyle
} from 'apeman-react-dialog'
const ExampleComponent = React.createClass({
getInitialState () {
return {
dialogEnabled: true
}
},
render () {
const s = this
let state = s.state
return (
<div>
<ApDialogStyle />
<ApDialog enabled={state.dialogEnabled}
onClose={() =>{s.toggleDialog(false)} }>
<ApDialogHeader>Dialog Header</ApDialogHeader>
<ApDialogBody>Dialog Body</ApDialogBody>
</ApDialog>
</div>
)
},
toggleDialog (enabled) {
const s = this
s.setState({
dialogEnabled: enabled
})
}
})