Skip to content

Instantly share code, notes, and snippets.

View avizuber's full-sized avatar

Avi Zuber avizuber

View GitHub Profile
@avizuber
avizuber / Animate.js
Created February 20, 2020 13:19
Animate
import styles from "./style.scss";
import PropTypes from "prop-types";
const Animate = ({ delay, children, animateFrom, animateTo, trigger, fadeIn, zoomIn }) => {
const finalStyles = animateTo && Object.entries(animateTo)
.map(([key, value]) => key + "_" + value)
.join(".");
let fromStyles = "Animate-element animate__start";
let actions = `addClassesDelay:${delay}:${styles["animate__end"]}`;