@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
10 lines • 1.34 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { ElementOrIcon } from '../elementOrIcon/elementOrIcon';
import { CustomContentContainerStyled, IconHighlightedContainerStyled, ParentContainerStyled, } from './iconHighlighted.styled';
import { IconHighlightedType } from './types/type';
const IconHighlightedStandAloneComponent = ({ disabled = false, selected = false, dataTestId = 'icon-highlighted', ...props }, ref) => {
return (_jsxs(ParentContainerStyled, { ref: ref, "data-testid": dataTestId, styles: props.styles[props.size], children: [_jsx(IconHighlightedContainerStyled, { backgroundColor: props.backgroundColor, disabled: disabled, selected: selected, styles: props.styles[props.size], children: _jsx(ElementOrIcon, { altText: props.type === 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 && (_jsx(CustomContentContainerStyled, { disabled: disabled, selected: selected, styles: props.styles[props.size], children: props.customContent }))] }));
};
export const IconHighlightedStandAlone = React.forwardRef(IconHighlightedStandAloneComponent);
//# sourceMappingURL=iconHighlightedStandAlone.js.map