main
Last change
on this file was 5d6f37a, checked in by Naum Shapkarovski <naumshapkarovski@…>, 7 weeks ago |
add customer
|
-
Property mode
set to
100644
|
File size:
917 bytes
|
Rev | Line | |
---|
[5d6f37a] | 1 | import { VariantsType } from '../types';
|
---|
| 2 | //
|
---|
| 3 | import { varTranEnter, varTranExit } from './transition';
|
---|
| 4 |
|
---|
| 5 | // ----------------------------------------------------------------------
|
---|
| 6 |
|
---|
| 7 | export const varRotate = (props?: VariantsType) => {
|
---|
| 8 | const durationIn = props?.durationIn;
|
---|
| 9 | const durationOut = props?.durationOut;
|
---|
| 10 | const easeIn = props?.easeIn;
|
---|
| 11 | const easeOut = props?.easeOut;
|
---|
| 12 |
|
---|
| 13 | return {
|
---|
| 14 | // IN
|
---|
| 15 | in: {
|
---|
| 16 | initial: { opacity: 0, rotate: -360 },
|
---|
| 17 | animate: {
|
---|
| 18 | opacity: 1,
|
---|
| 19 | rotate: 0,
|
---|
| 20 | transition: varTranEnter({ durationIn, easeIn }),
|
---|
| 21 | },
|
---|
| 22 | exit: {
|
---|
| 23 | opacity: 0,
|
---|
| 24 | rotate: -360,
|
---|
| 25 | transition: varTranExit({ durationOut, easeOut }),
|
---|
| 26 | },
|
---|
| 27 | },
|
---|
| 28 |
|
---|
| 29 | // OUT
|
---|
| 30 | out: {
|
---|
| 31 | initial: { opacity: 1, rotate: 0 },
|
---|
| 32 | animate: {
|
---|
| 33 | opacity: 0,
|
---|
| 34 | rotate: -360,
|
---|
| 35 | transition: varTranExit({ durationOut, easeOut }),
|
---|
| 36 | },
|
---|
| 37 | },
|
---|
| 38 | };
|
---|
| 39 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.