30 lines
638 B
JavaScript
30 lines
638 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
Object.defineProperty(exports, "fadeAtom", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return fadeAtom;
|
|
}
|
|
});
|
|
const _reactmotion = require("@fluentui/react-motion");
|
|
const fadeAtom = ({ direction, duration, easing = _reactmotion.motionTokens.curveLinear, fromValue = 0 })=>{
|
|
const keyframes = [
|
|
{
|
|
opacity: fromValue
|
|
},
|
|
{
|
|
opacity: 1
|
|
}
|
|
];
|
|
if (direction === 'exit') {
|
|
keyframes.reverse();
|
|
}
|
|
return {
|
|
keyframes,
|
|
duration,
|
|
easing
|
|
};
|
|
};
|