Back to the changelog
0.5.0
One styled root for a link or a button
A button that becomes a link when it has an href is one of the first components a design system needs. Its root can now be a <component is> over tags, which takes what a parent gives it the way a one-element root does, whichever tag renders.
New
- A parent's
classandstylemerge into whichever tag renders, and so does a styled parent's scope attribute. - An attribute that only some of the tags take, like
hrefonis={href ? "a" : "button"}, is accepted, and renders only on those tags. It used to be UF3006, which now only reports an attribute that no tag takes. ComponentApi.roothas a new value,"dynamic", with the tags inComponentApi.rootTags. Code that handles every value ofComponentApi.rootneeds to handle it too.
Fixed
- React compiles a listener on a
<component is>over tags, which failed to emit before. - The font audit that checks each capture's text sends its requests together, so a page with hundreds of elements no longer comes close to the test's timeout.