UNPKG

@ultraviolet/illustrations

Version:
27 lines (25 loc) 850 B
'use client'; import { __esmMin, __name } from "../../_virtual/_rolldown/runtime.js"; import { ILLUSTRATIONS, init_Illustrations } from "./__generated__/Illustrations.js"; import { useTheme } from "@ultraviolet/themes"; import { jsx } from "react/jsx-runtime"; //#region src/components/DynamicIllustration/index.tsx var DynamicIllustration; var init_DynamicIllustration = __esmMin(() => { init_Illustrations(); DynamicIllustration = ({ name, width, height, "data-testid": dataTestId, className, style }) => { const { theme } = useTheme(); return /* @__PURE__ */ jsx("img", { alt: name, className, "data-testid": dataTestId, height, src: ILLUSTRATIONS[theme === "light" ? "light" : "dark"][name], style, width }); }; }); //#endregion init_DynamicIllustration(); export { DynamicIllustration, init_DynamicIllustration };