Created
June 3, 2022 13:15
-
-
Save benjamindenboer/b8a1b8b7e2c3251e7f79f6e84dc85620 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { ComponentType } from "react" | |
export function Rotate(Component): ComponentType { | |
return (props) => { | |
return ( | |
<Component | |
{...props} | |
animate={{ rotate: 360 }} | |
transition={{ duration: 10, ease: "linear", repeat: Infinity }} | |
/> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment