Separate Client Portal & Dashboard
This commit is contained in:
28
frontend/dashboard/src/components/animate/variants/rotate.ts
Normal file
28
frontend/dashboard/src/components/animate/variants/rotate.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
// @types
|
||||
import { VariantsType } from '../type';
|
||||
//
|
||||
import { varTranEnter, varTranExit } from './transition';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const varRotate = (props?: VariantsType) => {
|
||||
const durationIn = props?.durationIn;
|
||||
const durationOut = props?.durationOut;
|
||||
const easeIn = props?.easeIn;
|
||||
const easeOut = props?.easeOut;
|
||||
|
||||
return {
|
||||
// IN
|
||||
in: {
|
||||
initial: { opacity: 0, rotate: -360 },
|
||||
animate: { opacity: 1, rotate: 0, transition: varTranEnter({ durationIn, easeIn }) },
|
||||
exit: { opacity: 0, rotate: -360, transition: varTranExit({ durationOut, easeOut }) },
|
||||
},
|
||||
|
||||
// OUT
|
||||
out: {
|
||||
initial: { opacity: 1, rotate: 0 },
|
||||
animate: { opacity: 0, rotate: -360, transition: varTranExit({ durationOut, easeOut }) },
|
||||
},
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user