@iobroker/adapter-react-v5
Version:
React components to develop ioBroker interfaces with react.
27 lines • 1.53 kB
JavaScript
/**
* Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>
*
* MIT License
*
*/
// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
import React, { Component } from 'react';
import { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';
import { Check as IconCheck } from '@mui/icons-material';
import { I18n } from '../i18n';
export class DialogError extends Component {
handleOk() {
if (this.props.onClose) {
this.props.onClose();
}
}
render() {
return (React.createElement(Dialog, { open: !0, maxWidth: "sm", fullWidth: this.props.fullWidth !== undefined ? this.props.fullWidth : true, onClose: () => this.handleOk(), "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description" },
React.createElement(DialogTitle, { id: "ar_alert_dialog_title" }, this.props.title || I18n.t('ra_Error')),
React.createElement(DialogContent, null,
React.createElement(DialogContentText, { id: "ar_alert_dialog_description" }, this.props.text || I18n.t('ra_Unknown error!'))),
React.createElement(DialogActions, null,
React.createElement(Button, { id: "ar_dialog_error_ok", variant: "contained", onClick: () => this.handleOk(), color: "primary", autoFocus: true, startIcon: React.createElement(IconCheck, null) }, I18n.t('ra_Ok')))));
}
}
//# sourceMappingURL=Error.js.map