-
Notifications
You must be signed in to change notification settings - Fork 153
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
fa-duotone-icon should assume the 'fad' prefix by default #295
Comments
I agree. We just need to come up with the good API to control it. |
Skimming how it determines the icon, it looks like you could just update protected findIconDefinition(i: IconProp | IconDefinition, prefix = this.config.defaultPrefix): IconDefinition | null {
const lookup = faNormalizeIconSpec(i, prefix);
...
} Which lets the override in protected findIconDefinition(i: IconProp | IconDefinition): IconDefinition | null {
const definition = super.findIconDefinition(i, 'fad');
...
} Would end up technically being a breaking change for anyone that was using duotone elements with non-duotone icons, but realistically if they were doing that then they were mis-using the element in the first place, and fixing it would be as easy as either using the regular icon element, or specifying the prefix that they were previously using. |
I would prefer to avoid making a breaking change right away. I'm leaning towards introducing a "per-component type" config as was suggested in #294 (comment) and allowing users to customize the prefix there. And then we'll need something similar to what you described above to actually fetch a value from different configs in different components. |
I wonder why do I need the |
duotone icons support more options than regular icons - |
Describe the problem
When using the duotone element, the default prefix is read by the global options when not explicitly provided.
What did you expect?
Unless specifically overridden it should infer that the icon set used for this element is "fad". Maybe a global config to change this behaviour too, that way you can change this without it being a breaking change for users
Reproducible test case
Basic setup of angular and FA, no special extras needed
The text was updated successfully, but these errors were encountered: