UNPKG

@ultraviolet/illustrations

Version:
29 lines (27 loc) 1.38 kB
'use client'; import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js"; import { heightVar, illustrationVariants, init_styles_css, url, widthVar } from "./styles.css.js"; import { ILLUSTRATIONS, init_Illustrations } from "./__generated__/Illustrations.js"; import { _objectSpread2, init_objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.120.0/helpers/objectSpread2.js"; import { jsx } from "react/jsx-runtime"; import { cn } from "@ultraviolet/utils"; import { assignInlineVars } from "@vanilla-extract/dynamic"; //#region src/components/WireIllustration/index.tsx var WireIllustration; var init_WireIllustration = __esmMin(() => { init_Illustrations(); init_styles_css(); init_objectSpread2(); WireIllustration = ({ width = 100, height = 100, "data-testid": dataTestId, className, sentiment = "neutral", name, style }) => /* @__PURE__ */ jsx("svg", { className: cn(className, illustrationVariants[sentiment]), "data-testid": dataTestId, style: _objectSpread2(_objectSpread2({}, assignInlineVars({ [url]: `url(${ILLUSTRATIONS[name]}) center center / contain no-repeat`, [widthVar]: typeof width === "number" ? `${width.toString()}px` : width, [heightVar]: typeof height === "number" ? `${height.toString()}px` : height })), style) }); }); //#endregion init_WireIllustration(); export { WireIllustration, init_WireIllustration };