@yamada-ui/motion
Version:
Yamada UI motion components
27 lines (25 loc) • 643 B
JavaScript
"use client"
// src/factory.ts
import { styled } from "@yamada-ui/core";
import { motion as _motion } from "motion/react";
function factory() {
const cache = /* @__PURE__ */ new Map();
return new Proxy(styled, {
apply: (_target, _thisArg, [el, options]) => {
const component = styled(el, options);
return _motion.create(component);
},
get: (_target, el) => {
if (!cache.has(el)) {
const component = styled(el);
cache.set(el, _motion.create(component));
}
return cache.get(el);
}
});
}
var motion = factory();
export {
motion
};
//# sourceMappingURL=chunk-ZXRMEE6R.mjs.map