UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

16 lines 1.72 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.IconHighlightedStandAlone = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const react_1 = __importDefault(require("react")); const elementOrIcon_1 = require("../elementOrIcon/elementOrIcon"); const iconHighlighted_styled_1 = require("./iconHighlighted.styled"); const type_1 = require("./types/type"); const IconHighlightedStandAloneComponent = ({ disabled = false, selected = false, dataTestId = 'icon-highlighted', ...props }, ref) => { return ((0, jsx_runtime_1.jsxs)(iconHighlighted_styled_1.ParentContainerStyled, { ref: ref, "data-testid": dataTestId, styles: props.styles[props.size], children: [(0, jsx_runtime_1.jsx)(iconHighlighted_styled_1.IconHighlightedContainerStyled, { backgroundColor: props.backgroundColor, disabled: disabled, selected: selected, styles: props.styles[props.size], children: (0, jsx_runtime_1.jsx)(elementOrIcon_1.ElementOrIcon, { altText: props.type === type_1.IconHighlightedType.INFORMATIVE ? props.altText : undefined, color: props.color, customIconStyles: !disabled ? props.styles[props.size]?.icon : props.styles[props.size]?.icon?.disabled, icon: props.icon }) }), props.customContent && ((0, jsx_runtime_1.jsx)(iconHighlighted_styled_1.CustomContentContainerStyled, { disabled: disabled, selected: selected, styles: props.styles[props.size], children: props.customContent }))] })); }; exports.IconHighlightedStandAlone = react_1.default.forwardRef(IconHighlightedStandAloneComponent); //# sourceMappingURL=iconHighlightedStandAlone.js.map