Skip to content

v4.0.0

Compare
Choose a tag to compare
@mshwery mshwery released this 28 Jul 23:19
· 36 commits to master since this release

v4.0.0

πŸŽ‰ πŸŽ‰ πŸŽ‰ We've released v4 of ui-box!

Breaking Changes:

  • innerRef is gone. Use ref (ui-box forwards refs to the underlying component)
  • Types have been updated and may break depending on how you previously were using them

Highlights

The types have been much improved for better polymorphic support. Inspired by types from Emotion and https://github.com/kripod/react-polymorphic-box we now have better support for polymorphic props when using the is prop. This worked before, but there were some limitations – namely using React.ComponentProps<typeof Box> would break and we didn't have a sane way to give you more type-safety.

Now you can also type your own components that extend ui-box by casting them as BoxComponent<ElementType, Props>

ui-box types

Details

v3.3.1...v4.0.0