[WIP] [RFC] feat(NcIcon): add a generic component and utils for icons #6348
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.
☑️ Resolves
Add a generic component to display icons in all supported formats.
Designed to develop components with a single
icon
prop and slot, supporting all the icon types:vue-material-design-icons/Account.vue
@mdi/svg/svg/account.svg
@mdi/js/account.js
https://path/to/icon.svg
ordata:image/svg+xml;base64,...
icon-account
With NcIcon
Without
Why add
component
icon type and not use<template #icon>
?Having icon as a prop even for a component allows passing it in 1 line instead of passing slot in 3-4 lines. Might be useful in some cases.
🖼️ Screenshots
🚧 Tasks
🏁 Checklist
next
requested with a Vue 3 upgrade