UNPKG

1.9 kBJavaScriptView Raw
1"use strict";
2// *****************************************************************************
3// Copyright (C) 2018 Ericsson and others.
4//
5// This program and the accompanying materials are made available under the
6// terms of the Eclipse Public License v. 2.0 which is available at
7// http://www.eclipse.org/legal/epl-2.0.
8//
9// This Source Code may also be made available under the following Secondary
10// Licenses when the conditions for such availability set forth in the Eclipse
11// Public License v. 2.0 are satisfied: GNU General Public License, version 2
12// with the GNU Classpath Exception which is available at
13// https://www.gnu.org/software/classpath/license.html.
14//
15// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16// *****************************************************************************
17Object.defineProperty(exports, "__esModule", { value: true });
18exports.AlertMessage = void 0;
19const React = require("react");
20const widget_1 = require("./widget");
21const AlertMessageIcon = {
22 INFO: (0, widget_1.codicon)('info'),
23 SUCCESS: (0, widget_1.codicon)('pass'),
24 WARNING: (0, widget_1.codicon)('warning'),
25 ERROR: (0, widget_1.codicon)('error')
26};
27class AlertMessage extends React.Component {
28 render() {
29 return React.createElement("div", { className: 'theia-alert-message-container' },
30 React.createElement("div", { className: `theia-${this.props.type.toLowerCase()}-alert` },
31 React.createElement("div", { className: 'theia-message-header' },
32 React.createElement("i", { className: AlertMessageIcon[this.props.type] }),
33 "\u00A0",
34 this.props.header),
35 React.createElement("div", { className: 'theia-message-content' }, this.props.children)));
36 }
37}
38exports.AlertMessage = AlertMessage;
39//# sourceMappingURL=alert-message.js.map
\No newline at end of file