UNPKG

@ultraviolet/illustrations

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