@ultraviolet/illustrations
Version:
Ultraviolet Illustrations
20 lines (19 loc) • 667 B
JavaScript
"use client";
;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("@emotion/react/jsx-runtime");
const react = require("@emotion/react");
const Illustrations = require("./__generated__/Illustrations.cjs");
const DynamicIllustration = ({
name,
width,
height,
"data-testid": dataTestId,
className
}) => {
const {
theme
} = react.useTheme();
return /* @__PURE__ */ jsxRuntime.jsx("img", { alt: name, className, "data-testid": dataTestId, height, src: Illustrations.ILLUSTRATIONS[theme === "light" ? "light" : "dark"][name], width });
};
exports.DynamicIllustration = DynamicIllustration;