logo

FUSE

DOCS

PurchaseBack to the Dashboard

FuseDialog

FuseDialog is a simple dialog trigger for easily showing dialog messages via redux action. It should be located in the theme layouts.

Usage

You can show dialog anywhere with dispatching the action openDialog, it is using Material-UI's dialog so you can pass the props in the object:

<Button
    onClick={()=> dispatch(openDialog({
        children: (
            <React.Fragment>
                <DialogTitle id="alert-dialog-title">Use Google's location service?</DialogTitle>
                <DialogContent>
                    <DialogContentText id="alert-dialog-description">
                        Let Google help apps determine location. This means sending anonymous location data to
                        Google, even when no apps are running.
                    </DialogContentText>
                </DialogContent>
                <DialogActions>
                    <Button onClick={()=> dispatch(closeDialog())} color="primary">
                        Disagree
                    </Button>
                    <Button onClick={()=> dispatch(closeDialog())} color="primary" autoFocus>
                        Agree
                    </Button>
                </DialogActions>
            </React.Fragment>
             )
         }))}
    variant="contained"
    color="secondary"
>
    Open Dialog
</Button>
Example