Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the icon component to take an svg as input #89

Merged
merged 2 commits into from
Feb 12, 2024
Merged

Enable the icon component to take an svg as input #89

merged 2 commits into from
Feb 12, 2024

Conversation

samuelmaier
Copy link
Contributor

When using standalone components, we need to provide the icons in each component. Sometimes we need to pass an icon from one component to another component, without knowing which icons to load beforehand AND without being able to use a dynamic loader.

Example:
I have a modal service taking a config. In the config I can define an icon to be display in the modals header. It is impossible to know, which icons the modal component needs to load AND loading the icons dynamically is not possible in my case.

Solution:
Enable the icon component to take either the name of the icon (which than gets loaded) or the svg of the icon directly. Therefor I can load the icon in one component and can pass it to any other component.

@ashley-hunter
Copy link
Collaborator

Thank you very much for the contribution! Will merge and release now, thanks!

@ashley-hunter ashley-hunter merged commit 41b218f into ng-icons:master Feb 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants