UNPKG

svelte-motion

Version:

Svelte animation library based on the React library framer-motion.

22 lines (18 loc) 639 B
/** based on framer-motion@4.0.3, Copyright (c) 2018 Framer B.V. */ import { checkIfControllingVariants, isVariantLabel } from '../../render/utils/variants.js'; function getCurrentTreeVariants(props, context) { if (checkIfControllingVariants(props)) { var initial = props.initial, animate = props.animate; return { initial: initial === false || isVariantLabel(initial) ? initial : undefined, animate: isVariantLabel(animate) ? animate : undefined, }; } return props.inherit !== false ? (context||{}) : {}; } export { getCurrentTreeVariants };