All files / src/components/AlertDialogSlide AlertDialogSlide.js

0% Statements 0/18
0% Branches 0/2
0% Functions 0/2
0% Lines 0/17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80                                                                                                                                                               
import React from 'react';
import PropTypes from 'prop-types';
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentText';
import DialogTitle from '@material-ui/core/DialogTitle';
import withMobileDialog from '@material-ui/core/withMobileDialog';
import { withStyles } from '@material-ui/core/styles';
 
const styles = theme => ({
    button: {
        margin: theme.spacing.unit
    },
    actionBtn: {
        padding: '0 24px'
    }
});
class AlertDialogSlide extends React.Component {
    // constructor(props) {
    //     super(props);
    // }
 
    render() {
        const {
            fullScreen,
            classes,
            open,
            modelTitle,
            modelContaint,
            onNoClose,
            onYesClose
        } = this.props;
        if (!open) {
            return null;
        }
        return (
            <div className='alertDialogBox'>
                <Dialog
                    fullScreen={fullScreen}
                    open={open}
                    onClose={this.handleClose}
                    aria-labelledby='responsive-dialog-title'
                >
                    <DialogTitle id='responsive-dialog-title' className='dialogTitle'>
                        {modelTitle}
                    </DialogTitle>
                    <DialogContent className='dialog_Content'>
                        <DialogContentText>{modelContaint}</DialogContentText>
                    </DialogContent>
                    <DialogActions className={classes.actionBtn}>
                        <Button className={classes.button} onClick={onNoClose} variant='outlined'>
                            No
                        </Button>
                        <Button
                            className={classes.button}
                            onClick={onYesClose}
                            color='primary'
                            autoFocus
                            variant='outlined'
                        >
                            Yes
                        </Button>
                    </DialogActions>
                </Dialog>
            </div>
        );
    }
}
 
AlertDialogSlide.propTypes = {
    // open: PropTypes.bool,
    onNoClose: PropTypes.func.isRequired,
    onYesClose: PropTypes.func.isRequired,
    fullScreen: PropTypes.bool.isRequired
};
 
export default withMobileDialog()(withStyles(styles)(AlertDialogSlide));