styletron / styletron

:zap: Toolkit for component-oriented styling
https://www.styletron.org
MIT License
3.32k stars 100 forks source link

`animationName` property does not conform to Property.AnimationName #423

Open jonsadka opened 2 years ago

jonsadka commented 2 years ago

Issue: Per Styletron docs, keyframes takes the entire animation object to be set as animationName, however TypeScript throws an errors because animationName should be equal to Property.AnimationName | undefined per https://developer.mozilla.org/docs/Web/CSS/animation-name

Code Sandbox: Repro case (FYI takes a minute to load): https://codesandbox.io/s/staging-sea-flnccp?file=/src/App.tsx

Error: Type '{ from: { marginLeft: string; }; to: { marginLeft: string; }; }' is not assignable to type 'AnimationName | undefined'.

Screen Shot 2022-06-10 at 6 10 37 PM
jonsadka commented 2 years ago

cc @rtsao