diff --git a/src/OnboardingSPA/components/Animate/index.js b/src/OnboardingSPA/components/Animate/index.js new file mode 100644 index 000000000..fb9b58d18 --- /dev/null +++ b/src/OnboardingSPA/components/Animate/index.js @@ -0,0 +1,37 @@ +/** + * A Animator to show animation + * + * @param {string} type The name of Animation to be shown. + * @param { object | boolean } after The variable to look after for before showing the animation, by default true to show the children right away. + * + */ +const Animate = ( { type, after = true, children } ) => { + const prefix = 'animate'; + + /** + * Returns the appropriate className + * + * @return {string | void} ClassName that applies the animations + */ + function getAnimateClassName() { + if ( type ) { + let classname = ''; + + switch ( type ) { + // Add animation types and appropriate CSS + case 'fade-in': + classname = prefix.concat( '__fade-in' ); + break; + } + return classname; + } + } + + return ! after ? ( +
Loading your details...
} -