element-motion
element-motion copied to clipboard
Reshaping styling api could be better
It was a mistake having all style props at the top level. If we look at a more standardised solution atm it would be via a theme prop, I guess? should it be a function? should it be an object? should it be style?
it is, at the end of the day, a style, but not all styles are allowed to pass through.
this can be done as a non-breaking change first, and then remove the other styles after. styles inside style prop take precedence.
<ReshapingContainer
triggerKey={`${toggler.shown}`}
+ style={{ padding: '16px', maxWidth: '500px', margin: '0 auto' }}
- padding="16px"
- maxWidth="500px"
- margin="0 auto"
/>