Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 34x 34x 34x 38x 38x 180x 14x 14x 38x | import { MotionProps } from "../../../motion/types" import { isMotionValue } from "../../../value/utils/is-motion-value" import { scrapeMotionValuesFromProps as scrapeHTMLMotionValuesFromProps } from "../../html/utils/scrape-motion-values" export function scrapeMotionValuesFromProps(props: MotionProps) { const newValues = scrapeHTMLMotionValuesFromProps(props) for (const key in props) { if (isMotionValue(props[key])) { const targetKey = key === "x" || key === "y" ? "attr" + key.toUpperCase() : key newValues[targetKey] = props[key] } } return newValues } |