epn-ui
Version:
Дизайн система кабинета ВМ
14 lines (11 loc) • 1.19 kB
JavaScript
import React from 'react';
import Alert from 'antd/lib/alert';
import clsx from 'clsx';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTimes } from '@fortawesome/pro-regular-svg-icons/faTimes';
var BaseAlert = function (_a) {
var id = _a.id, background = _a.background, backgroundStyle = _a.backgroundStyle, type = _a.type, message = _a.message, closable = _a.closable, className = _a.className, style = _a.style, action = _a.action, banner = _a.banner, _b = _a.showIcon, showIcon = _b === void 0 ? false : _b, onClose = _a.onClose, afterClose = _a.afterClose;
return (React.createElement(Alert, { closeIcon: React.createElement(FontAwesomeIcon, { icon: faTimes }), className: clsx('epn-alert', className), style: style, type: type, banner: banner, message: id ? React.createElement("span", { id: id }, message) : message, description: background ? (React.createElement("div", { className: "epn-alert-background", style: backgroundStyle }, background)) : undefined, closable: closable, action: action, showIcon: showIcon, onClose: onClose, afterClose: afterClose }));
};
var BaseAlert$1 = BaseAlert;
export { BaseAlert, BaseAlert$1 as default };