alinea
Version:
Headless git-based CMS
42 lines (39 loc) • 949 B
JavaScript
import {
dist_default
} from "../chunks/chunk-A5O3N2GS.js";
import "../chunks/chunk-NZLE2WMY.js";
// src/ui/Icon.module.scss
var Icon_module_default = {
"root": "alinea-Icon",
"is-round": "alinea-Icon-is-round",
"isRound": "alinea-Icon-is-round",
"is-active": "alinea-Icon-is-active",
"isActive": "alinea-Icon-is-active"
};
// src/ui/Icon.tsx
import { px } from "./util/Units.js";
import { jsx } from "react/jsx-runtime";
var styles = dist_default(Icon_module_default);
function Icon({
icon,
size,
round,
active,
variant,
...props
}) {
const IconView = icon;
if (!IconView) return null;
return /* @__PURE__ */ jsx(
"i",
{
...props,
style: { ...props.style, fontSize: size ? px(size) : void 0 },
className: styles.root.mergeProps(props)({ round, active }, variant),
children: typeof IconView === "function" ? /* @__PURE__ */ jsx(IconView, {}) : IconView
}
);
}
export {
Icon
};