-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Experimental] Add support for using components as icons #481
[Experimental] Add support for using components as icons #481
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
Some quick feedback. I'll try to take a better look tomorrow.
1679623
to
ccdebfa
Compare
Thinking about this some more. I don't think this will fix the problem in the frontend-embeddable-notule-editor project, since we also use the So while I still think accepting component for |
ccdebfa
to
e6413b5
Compare
e6413b5
to
5780b3d
Compare
Warning
This setup is still in an experimental state. We want to try it out in a couple of specific places before considering this ready to use by all the Appuniversum users. We might still break the setup in future minor versions until we announce it as stable.
Another PR in the line of PRs attempting to address the issue of inline SVGs.
This time the approach is to allow passing of arbitrary components to
AuIcon
(and by extension, any component taking an@icon
argument).The advantages of this method are that this is very flexible to the user. Also, by overloading
@icon
it avoids confusion that could be caused by adding a new argument, as only one ofstring
orComponent
can be passed.A minor downside is that the user can potentially pass a component that could cause rendering issues.
A risk is that in order to pass arguments to the component, for example; to pass an
AuIcon
as a custom component, you need an argument to specify which icon to use; you must use thecomponent
helper. In this way it is easy to write code that embroider can't statically analyse.