UNPKG

@kcirtaptrick/framer-motion

Version:

A simple and powerful React animation library

19 lines (16 loc) 530 B
import { isCustomValue } from '../../utils/resolve-value.mjs'; import { isMotionValue } from './is-motion-value.mjs'; /** * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself * * TODO: Remove and move to library * * @internal */ function resolveMotionValue(value) { var unwrappedValue = isMotionValue(value) ? value.get() : value; return isCustomValue(unwrappedValue) ? unwrappedValue.toValue() : unwrappedValue; } export { resolveMotionValue };