@smart-react-components/ui
Version:
SRC UI includes React and Styled components.
21 lines (20 loc) • 1.51 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const element_props_1 = __importDefault(require("@smart-react-components/core/element-props"));
const click_events_1 = __importDefault(require("@smart-react-components/core/element-props/click-events"));
const react_1 = __importDefault(require("react"));
const AlertIconElement_1 = __importDefault(require("../components/Alert/AlertIconElement"));
const props_1 = require("../util/props");
const AlertIcon = (props) => {
var _a, _b;
return (react_1.default.createElement(AlertIconElement_1.default, Object.assign({ alertPalette: (_a = props.alertPalette) !== null && _a !== void 0 ? _a : props.palette, alertIconSize: props.size, alertIconSizeSm: props.sizeSm, alertIconSizeMd: props.sizeMd, alertIconSizeLg: props.sizeLg, alertIconSizeXl: props.sizeXl, hasBackground: props.hasBackground, hasHover: props.hasHover, iconPosition: props.position, isClickable: (0, props_1.isItemClickable)(props), isOutline: props.isOutline, isSoft: props.isSoft, palette: (_b = props.palette) !== null && _b !== void 0 ? _b : props.alertPalette }, (0, element_props_1.default)(props, [click_events_1.default]), props.elementProps), props.children));
};
AlertIcon.defaultProps = {
elementProps: {},
hasBackground: true,
};
AlertIcon.displayName = 'SRCAlertIcon';
exports.default = AlertIcon;
;