@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
34 lines (30 loc) • 1.38 kB
JavaScript
"use client";
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
const require_utils_index = require('../../utils/index.cjs');
const require_system_provider = require('../../core/system/system-provider.cjs');
const require_factory = require('../../core/system/factory.cjs');
let react = require("react");
react = require_rolldown_runtime.__toESM(react);
let react_jsx_runtime = require("react/jsx-runtime");
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
let motion_react = require("motion/react");
motion_react = require_rolldown_runtime.__toESM(motion_react);
//#region src/components/motion/motion.tsx
const Component = require_factory.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 = require_system_provider.useSystem();
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
ref,
as: (0, react.useMemo)(() => motion_react.motion.create(asProp), [asProp]),
className: (0, require_utils_index.utils_exports.cx)(system.utils.getClassName("motion"), className),
...rest
});
});
//#endregion
exports.Motion = Motion;
//# sourceMappingURL=motion.cjs.map