@progress/kendo-react-animation
Version:
React Animation component assists with animating HTML elements. KendoReact Animation package
57 lines (56 loc) • 1.41 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import * as l from "react";
import t from "prop-types";
import { Animation as u } from "./Animation.mjs";
const f = (r) => {
const {
appear: i = n.appear,
enter: e = n.enter,
exit: o = n.exit,
transitionEnterDuration: a = n.transitionEnterDuration,
transitionExitDuration: s = n.transitionExitDuration,
direction: p = n.direction,
children: c,
...d
} = r, m = {
transitionName: `slide-${p}`
};
return /* @__PURE__ */ l.createElement(
u,
{
...m,
appear: i,
enter: e,
exit: o,
transitionEnterDuration: a,
transitionExitDuration: s,
...d
},
c
);
}, n = {
appear: !1,
enter: !0,
exit: !0,
transitionEnterDuration: 300,
transitionExitDuration: 300,
direction: "down"
};
f.propTypes = {
children: t.oneOfType([t.arrayOf(t.node), t.node]),
childFactory: t.any,
className: t.string,
direction: t.oneOf(["up", "down", "left", "right"]),
component: t.string,
id: t.string,
style: t.any
};
export {
f as Slide
};