welcome-ui
Version:
Customizable design system with react • styled-components • styled-system and ariakit.
51 lines (50 loc) • 1.09 kB
JavaScript
"use client";
import { j as a } from "./jsx-runtime-Bqq1Hxg9.mjs";
import { forwardRef as m } from "./System.mjs";
import d, { css as i } from "@xstyled/styled-components";
const g = i`
g,
path {
stroke: inherit;
fill: none;
}
`, u = i`
g,
path {
stroke: none;
}
`, l = d.svgBox(({ isFlag: o, size: s = "md", stroked: r, theme: t }) => {
const e = t.icons[s] || s;
return i`
${!o && (r ? g : u)};
width: ${e};
height: ${e};
`;
}), f = m(
({ content: o, dataTestId: s, size: r = "md", title: t, ...e }, n) => {
const c = e.className || "";
return o ? /* @__PURE__ */ a.jsx(
l,
{
alt: t,
dangerouslySetInnerHTML: { __html: o.block },
"data-testid": s ? `icon-${s}` : null,
isFlag: o.isFlag,
ref: n,
role: "img",
size: r,
stroked: o.stroked,
title: t,
viewBox: o.viewBox || "0 0 100 100",
...e,
className: `${c} wui-icon`
}
) : null;
}
);
f.displayName = "Icon";
const k = l;
export {
f as Icon,
k as StyledIcon
};