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

Improve typedefs for icon names #10092

Closed
joshualamusga1 opened this issue Aug 7, 2019 · 3 comments
Closed

Improve typedefs for icon names #10092

joshualamusga1 opened this issue Aug 7, 2019 · 3 comments

Comments

@joshualamusga1
Copy link
Contributor

joshualamusga1 commented Aug 7, 2019

Describe the feature that you would like added

It would be nice to have strongly-typed icon names. It's added type-safety and helps us find icons. There are no downsides beyond whatever maintenance is required.

What component or utility would this be added to

A new type definition should be added. It should look something like this:

export type FontIcon = "12PointStar" | "6PointStar" | "AADLogo" // ...and so on

The type definitions where an icon name would be supplied should be updated. Instead of taking string | undefined, take FontIcon | undefined. Anything else that logically expects an icon name should be similarly updated.

Have you discussed this feature with our team, and if so, who

Nope, no discussion so far.

@jdhuntington
Copy link
Contributor

@joshualamusga1 This is a good idea; thank you! I will figure out where this can go on our roadmap.

@jdhuntington
Copy link
Contributor

The one wrinkle I'm not immediately sure how to solve is the presence of custom icons ( https://github.com/OfficeDev/office-ui-fabric-react/wiki/Using-icons#registering-custom-icons ). I'm sure there's a good solution though.

@msft-fluent-ui-bot
Copy link
Collaborator

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

@msft-fluent-ui-bot msft-fluent-ui-bot added the Resolution: Soft Close Soft closing inactive issues over a certain period label Apr 26, 2021
@microsoft microsoft locked as resolved and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants