//--------------------- Simple helper functions -------------------//
async function main() {
await muiDialogs.alert({
title: 'My title',
content: 'My message',
okLabel: 'Ok'
})
}
main()
//------------------------ with Redux Form -------------------------//
class TestReduxFormDialog extends PureComponent {
formDialogRef = formDialog => {
this.formDialog = formDialog;
}
showForm = async() => {
const values = await this.formDialog.show();
// values is null if the dialog was cancelled
console.log("values", values);
}
render() {
return (
<FlatButton onTouchTap={this.showForm} label="ShowForm"/>
<ReduxFormDialog
ref={this.formDialogRef}
title="Form Title"
>
<AnyReduxForm />
</ReduxFormDialog>
)
}
}
// you can use the showForm function directly, but you'll have to provide the Redux store as an argument.
forked from jrop/material-ui-dialogs
-
Notifications
You must be signed in to change notification settings - Fork 0
oallouch/material-ui-dialogs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- JavaScript 91.8%
- HTML 8.2%