UNPKG

tuxx

Version:

Framework built on React and Flux

29 lines (27 loc) 1.06 kB
'use strict'; var createAnimation = require('tuxx/Animations').createAnimation; var assign = require('object-assign'); var CommonOpacityProps = require('tuxx/Animations/CommonOpacityProps'); //Default Zoom animation component var Zoom = { //Class name given to the animation component once mounted className: 'zoom', //CSS for wrapped component on entry enter: assign({}, CommonOpacityProps.enter, { 'transform': 'scale(.1)' }), //CSS for wrapped component when entry animation completes 'enter-active': assign({}, CommonOpacityProps['enter-active'], { 'transform': 'scale(1)' }), //CSS for wrapped component on leave leave: assign({}, CommonOpacityProps.leave, { 'transform': 'scale(1)' }), //CSS for wrapped component when leave animation completes 'leave-active': assign({}, CommonOpacityProps['leave-active'], { 'transform': 'scale(.1)' }) }; //Use createAnimation function from main Tuxx Animation module to create wrapping animation component and pass in the default params module.exports = createAnimation(Zoom);