one-api/web/berry/src/layout/NavMotion.js
Buer 48989d4a0b
feat: add new theme berry (#860)
* feat: add theme berry

* docs: add development notes

* fix: fix blank page

* chore: update implementation

* fix: fix package.json

* chore: update ui copy

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-01-07 14:20:07 +08:00

40 lines
751 B
JavaScript

import PropTypes from 'prop-types';
import { motion } from 'framer-motion';
// ==============================|| ANIMATION FOR CONTENT ||============================== //
const NavMotion = ({ children }) => {
const motionVariants = {
initial: {
opacity: 0,
scale: 0.99
},
in: {
opacity: 1,
scale: 1
},
out: {
opacity: 0,
scale: 1.01
}
};
const motionTransition = {
type: 'tween',
ease: 'anticipate',
duration: 0.4
};
return (
<motion.div initial="initial" animate="in" exit="out" variants={motionVariants} transition={motionTransition}>
{children}
</motion.div>
);
};
NavMotion.propTypes = {
children: PropTypes.node
};
export default NavMotion;