@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
16 lines (15 loc) • 754 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { allIcons } from '../../components/icons';
import UIHelper from '../UIHelper';
import { Box } from '../../components/Flex';
export const ActiveAlertsPanelItemLabel = (props) => {
const iconColor = UIHelper.getColorByMessageType(props.data.alertDefinition.MessageType);
const iconStyle = {
color: iconColor,
fill: iconColor,
};
const iconName = UIHelper.getGlyphByMessageType(props.data.alertDefinition.MessageType);
const IconCmp = allIcons[iconName];
const icon = IconCmp ? _jsx(IconCmp, {}) : null;
return (_jsxs(Box, { children: [_jsx(Box, { className: "twa:float-left", style: iconStyle, children: icon }), props.data.header] }));
};