UNPKG

@iobroker/adapter-react-v5

Version:

React components to develop ioBroker interfaces with react.

29 lines 1.69 kB
/** * 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 { Close as IconClose } from '@mui/icons-material'; import { I18n } from '../i18n'; export class DialogMessage 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": "ar_dialog_message_title", "aria-describedby": "ar_dialog_message_description" }, React.createElement(DialogTitle, { id: "ar_dialog_message_title" }, this.props.title || I18n.t('ra_Message')), React.createElement(DialogContent, null, React.createElement(DialogContentText, { id: "ar_dialog_message_description" }, React.createElement("span", { style: { marginRight: this.props.icon ? 8 : 0 } }, this.props.icon || null), this.props.text)), React.createElement(DialogActions, null, React.createElement(Button, { id: "ar_dialog_message_ok", variant: "contained", onClick: () => this.handleOk(), color: "primary", autoFocus: true, startIcon: React.createElement(IconClose, null) }, this.props.ok || I18n.t('ra_Close'))))); } } //# sourceMappingURL=Message.js.map