@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
25 lines • 839 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAnimationConfig = void 0;
const getAnimationConfig = (styles, device, defaultAnimation, defaultAnimationOptions) => {
let config;
const deviceStyles = styles[device];
if (defaultAnimation && defaultAnimationOptions) {
config = {
animation: defaultAnimation,
animationOptions: defaultAnimationOptions,
};
}
else if (deviceStyles && deviceStyles.animation && deviceStyles.animationOptions) {
config = {
animation: deviceStyles.animation,
animationOptions: deviceStyles.animationOptions,
};
}
else {
config = null;
}
return config;
};
exports.getAnimationConfig = getAnimationConfig;
//# sourceMappingURL=getAnimationConfig.js.map