UNPKG

@hitachivantara/uikit-react-icons

Version:

NEXT Design System icons packaged as a set of React components.

20 lines (19 loc) 605 B
import { jsx } from "react/jsx-runtime"; import { IconBase } from "./IconBase.js"; import { isSelector, isSort } from "./utils.js"; const getSecondaryColor = (iconName) => { if (isSelector(iconName)) return "atmo1"; if (isSort(iconName)) return "atmo4"; return "atmo2"; }; const HvIconSprite = ({ spriteUrl, iconName, ...others }) => { const baseColors = ["secondary", getSecondaryColor(iconName)]; return /* @__PURE__ */ jsx(IconBase, { iconName, palette: baseColors, ...others, children: /* @__PURE__ */ jsx("use", { href: `${spriteUrl}#${iconName}` }) }); }; export { HvIconSprite };