UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

30 lines (28 loc) 810 B
import { styled } from "../../core/system/factory.js"; import { motion } from "motion/react"; //#region src/components/motion/factory.ts function factory() { const cache = /* @__PURE__ */ new Map(); return new Proxy(styled, { apply: function(_target, _thisArg, [el, options]) { const component = styled(el, options); return motion.create(component); }, get: function(_target, el) { if (!cache.has(el)) { const component = styled(el); cache.set(el, motion.create(component)); } return cache.get(el); } }); } /** * `motion` is a component that allows for the easy implementation of a wide variety of animations. * * @see https://yamada-ui.com/docs/components/motion */ const motion$1 = factory(); //#endregion export { motion$1 as motion }; //# sourceMappingURL=factory.js.map