element-motion
element-motion copied to clipboard
Improve internal composable API for className
We can't easily compose things from className and keyframes ATM. Since this library wants to try and do things via CSS animation (over JS animation) we need to come up with a solution.
API thoughts:
setChildProps({
// composable style
style: prevStyle => ({ ...prevStyle }),
// composable class via objects
classNameStyle: prevStyle => ({ ...prevStyle }),
// composable keyframes
keyframes: prevKeyframes => compose => compose(prevKeyframes, newKeyframes, 'animation-name'),
});
- Removes
classNamefrom API (deprecated first) - Adds
classNameStyleto API - Remove
emotiondependency
Keyframes is done.