@wix/design-system
Version:
@wix/design-system
20 lines • 888 B
JavaScript
import React from 'react';
import { ChevronRightSmall } from '@wix/wix-ui-icons-common';
import { useIcons } from '../../WixDesignSystemIconThemeProvider';
import { dataHooks } from '../constants';
import { classes } from '../SidebarSubMenuNext.st.css.js';
const ChevronSuffix = () => {
const icons = useIcons('SidebarSubMenuNext', { ChevronRightSmall });
return (React.createElement("span", { className: classes.chevronRight },
React.createElement(icons.ChevronRightSmall, { "data-hook": dataHooks.chevronRight, size: "18px" })));
};
const chevronSuffixJsx = React.createElement(ChevronSuffix, { key: "chevron" });
export const getSuffixWithChevron = (suffix) => {
if (!suffix) {
return chevronSuffixJsx;
}
return Array.isArray(suffix)
? [suffix[0], chevronSuffixJsx]
: [suffix, chevronSuffixJsx];
};
//# sourceMappingURL=common.js.map