Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const Three = () => {
const [active, setActive] = React.useState(false);
return (
<motion.div
className="rectangle"
animate={
active
? { background: "#ff00b1", rotate: 90 }
: { background: "#0D00FF", rotate: 0 }
}
onClick={() => setActive(!active)}
>
Click me!
</motion.div>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.