UNPKG

@yamada-ui/react

Version:

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

30 lines (26 loc) 946 B
"use client"; import { utils_exports } from "../../utils/index.js"; import { useSystem } from "../../core/system/system-provider.js"; import { styled } from "../../core/system/factory.js"; import { useMemo } from "react"; import { jsx } from "react/jsx-runtime"; import { motion } from "motion/react"; //#region src/components/motion/motion.tsx const Component = styled("div", { forwardProps: ["transition"] }); /** * `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 = (({ ref, as: asProp = "div", className,...rest }) => { const system = useSystem(); return /* @__PURE__ */ jsx(Component, { ref, as: useMemo(() => motion.create(asProp), [asProp]), className: (0, utils_exports.cx)(system.utils.getClassName("motion"), className), ...rest }); }); //#endregion export { Motion }; //# sourceMappingURL=motion.js.map