feat(icons): add Icon suffix to all icons and deprecate old names #127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After considering the request in #104 to add the "Icon" prefix to all icon components to aid readability in JSX and to not pollute the scope with common names, I have decided that doing something like this is worthwhile. After playing around with it I landed on using the suffix form, e.g.:
These are now the primary names for icon components exported from the library. The original names are still exported but are marked as deprecated, pointing users to the new suffixed name:
The filenames have not changed to reflect this, for two reasons:
We also should now have better support in some edge cases for Next.js by way of better disambiguation between
es
andcjs
exports.I will publish this under the
next
tag on NPM for testing until confident in these changes.