securityos/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs

14 lines
508 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';
import { isVariantLabel } from './is-variant-label.mjs';
import { variantProps } from './variant-props.mjs';
function isControllingVariants(props) {
return (isAnimationControls(props.animate) ||
variantProps.some((name) => isVariantLabel(props[name])));
}
function isVariantNode(props) {
return Boolean(isControllingVariants(props) || props.variants);
}
export { isControllingVariants, isVariantNode };