react
react copied to clipboard
chore: Add defaultAs argument to toggleStyledComponent utility
This adds a defaultAs
argument to the toggleStyledComponent
utility. This is because we were defaulting the BaseComponent
to 'div'
when no as
prop was provided. This was incorrect sometimes because the styled component was using something like styled.a
Rollout strategy
- [ ] Patch release
- [ ] Minor release
- [ ] Major release; if selected, include a written rollout or migration plan
- [x] None; if selected, include a brief description as to why
Merge checklist
- [ ] Added/updated tests
- [ ] Added/updated documentation
- [ ] Added/updated previews (Storybook)
- [ ] Changes are SSR compatible
- [ ] Tested in Chrome
- [ ] Tested in Firefox
- [ ] Tested in Safari
- [ ] Tested in Edge
- [ ] (GitHub staff only) Integration tests pass at github/github (Learn more about how to run integration tests)