@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
17 lines • 2.71 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NavigationRowStandalone = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const text_1 = require("../../components/text/text");
const component_1 = require("../../components/text/types/component");
const type_1 = require("../button/types/type");
const elementOrIcon_1 = require("../elementOrIcon/elementOrIcon");
const iconHighlighted_1 = require("../iconHighlighted/iconHighlighted");
const navigationRow_styled_1 = require("./navigationRow.styled");
const NavigationRowStandaloneComponent = ({ dataTestId = 'navigation-row', topLine = false, bottomLine = false, ...props }, ref) => {
const iconHighlightedSize = props.iconHighlighted?.size ?? props.styles.iconHighlighted?.size;
return ((0, jsx_runtime_1.jsxs)(navigationRow_styled_1.NavigationRowStyled, { ref: ref, bottomLine: bottomLine, "data-testid": dataTestId, lineSeparatorLineStyles: props.lineSeparatorLineStyles, styles: props.styles, topLine: topLine, type: type_1.ButtonType.BUTTON, onClick: props.onClick, children: [(0, jsx_runtime_1.jsxs)(navigationRow_styled_1.IconAndIconHighlightedContainerStyled, { styles: props.styles, children: [props.decorativeIcon && !props.iconHighlighted && ((0, jsx_runtime_1.jsx)(elementOrIcon_1.ElementOrIcon, { customIconStyles: props.styles.decorativeIcon, ...props.decorativeIcon })), props.iconHighlighted && props.styles.iconHighlighted && iconHighlightedSize && ((0, jsx_runtime_1.jsx)(iconHighlighted_1.IconHighlighted, { backgroundColor: props.styles.iconHighlighted?.backgroundColor, color: props.styles.iconHighlighted?.color, variant: props.styles.iconHighlighted?.variant, ...props.iconHighlighted, size: iconHighlightedSize }))] }), props.decorativeElement && ((0, jsx_runtime_1.jsx)(navigationRow_styled_1.DecorativeElementContainerStyled, { styles: props.styles, children: props.decorativeElement })), (0, jsx_runtime_1.jsxs)(navigationRow_styled_1.TextSectionStyled, { styles: props.styles, children: [props.text && ((0, jsx_runtime_1.jsx)(text_1.Text, { component: component_1.TextComponentType.SPAN, customTypography: props.styles.text, ...props.text, children: props.text.content })), (0, jsx_runtime_1.jsx)(text_1.Text, { component: component_1.TextComponentType.SPAN, customTypography: props.styles.description, ...props.description, children: props.description?.content })] }), (0, jsx_runtime_1.jsx)(elementOrIcon_1.ElementOrIcon, { customIconStyles: props.styles.arrowIcon, ...props.arrowIcon })] }));
};
exports.NavigationRowStandalone = (0, react_1.forwardRef)(NavigationRowStandaloneComponent);
//# sourceMappingURL=navigationRowStandAlone.js.map