element-motion icon indicating copy to clipboard operation
element-motion copied to clipboard

Improve internal composable API for className

Open itsdouges opened this issue 6 years ago • 1 comments

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 className from API (deprecated first)
  • Adds classNameStyle to API
  • Remove emotion dependency

itsdouges avatar Jun 30 '19 22:06 itsdouges

Keyframes is done.

itsdouges avatar Jul 26 '19 23:07 itsdouges