mod-arch-shared
Version:
Shared UI components and utilities for modular architecture micro-frontend projects
17 lines • 908 B
JavaScript
import * as React from 'react';
import { sectionTypeBackgroundColor, typedBackgroundColor, sectionTypeIconColor, typedIconColor, } from '../../components/design/utils';
import TypedObjectIcon from '../../components/design/TypedObjectIcon';
const HeaderIcon = ({ size = 40, padding = 4, display = 'inline-block', type, sectionType, }) => (React.createElement("div", { style: {
display,
width: size,
height: size,
padding,
borderRadius: size / 2,
background: sectionType
? sectionTypeBackgroundColor(sectionType)
: typedBackgroundColor(type),
color: sectionType ? sectionTypeIconColor(sectionType) : typedIconColor(type),
} },
React.createElement(TypedObjectIcon, { resourceType: type, style: { width: size - padding * 2, height: size - padding * 2 } })));
export default HeaderIcon;
//# sourceMappingURL=HeaderIcon.js.map