docs: corrects syntax error in transition code sample (#8169)

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
pull/8295/head
Alicia Sykes 2 years ago committed by GitHub
parent d7e4b1c8fc
commit 0598c989a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1307,14 +1307,12 @@ A custom animation function can also return a `tick` function, which is called *
const d = Math.sqrt(dx * dx + dy * dy); const d = Math.sqrt(dx * dx + dy * dy);
return { return {
delay: 0, delay: 0,
duration: Math.sqrt(d) * 120, duration: Math.sqrt(d) * 120,
easing: cubicOut, easing: cubicOut,
tick: (t, u) => tick: (t, u) =>
Object.assign(node.style, { Object.assign(node.style, { color: t > 0.5 ? 'Pink' : 'Blue' })
color: t > 0.5 ? 'Pink' : 'Blue' };
});
};
} }
</script> </script>

Loading…
Cancel
Save