norma-library
Version:
Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.
26 lines • 1.55 kB
JavaScript
import React from 'react';
import { WarningRounded, CheckCircleRounded, InfoRounded } from '@mui/icons-material';
import * as S from './StatusModal.style';
import { Button } from '../Button';
export var ModalStatus = function (props) {
var title = props.title, text = props.text, type = props.type, actions = props.actions, w = props.w;
var iconBgColor = {
warning: '#FFDB9F',
info: '#D9FCFE',
success: '#C9F5CB',
};
return (React.createElement(S.Container, null,
React.createElement(S.Modal, { "$w": w },
React.createElement(S.ModalHeader, null,
React.createElement(S.ModalIcon, { "$bg": iconBgColor[type] },
type === 'warning' && React.createElement(WarningRounded, { sx: { fill: '#B74608' } }),
type === 'info' && React.createElement(InfoRounded, { sx: { fill: '#154F8C' } }),
type === 'success' && React.createElement(CheckCircleRounded, { sx: { fill: '#2E7D32' } })),
React.createElement(S.ModalTitle, null, title)),
React.createElement(S.ModalBody, null,
React.createElement(S.ModalText, null, text)),
React.createElement(S.ModalFooter, null, actions.map(function (action, key) {
return (React.createElement(Button, { key: key, color: action.color || 'primary', variant: action.variant || 'contained', disabled: action.disabled, onClick: action.action }, action.label));
})))));
};
//# sourceMappingURL=StatusModal.js.map