-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(react-file-type-icons): Add getFileTypeIconAsUrl utility #27336
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
feat(react-file-type-icons): Add getFileTypeIconAsUrl utility #27336
Conversation
65e7d71 to
f173b2c
Compare
@microsoft-github-policy-service agree company="Microsoft" |
📊 Bundle size report🤖 This report was generated against cf06ea0a7e401c18e5a7f829b95dc2405ce0c867 |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 57c6bdb:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: cf06ea0a7e401c18e5a7f829b95dc2405ce0c867 (build) |
f173b2c to
25cd19a
Compare
|
This looks distinctly useful in terms of adding more flexiblity to the invocation methods to ensure every app always gets the right filetype icon. It seems actually pretty necessary to support a more broad set of platforms. From that standpoint it's got approval from me. I can't speak as to the way the method is being published, eg TypeScript or Fluent conventions as I'm not the expert there. |
bigbadcapers
left a comment
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.
Approved from a functionality / needs standpoint. Very useful new method. Please check with other TypeScript/RN/Fluent experts on as to whether it's been exposed with the proper naming conventions, etc.
|
@tomi-msft can you help with getting necessary approvals to complete this PR? 🙂 |
|
🎉 Handy links: |
* master: applying package updates doc: Remove wrong recommendation from input (microsoft#28168) fix: Outline color now respects OS force colors settings (microsoft#28182) Datepicker onCalendarOpenStateChange prop (microsoft#28136) feat(react-file-type-icons): Add getFileTypeIconAsUrl utility (microsoft#27336) applying package updates [FIX] Updates selection dot and label positioning for ChoiceGroupOption when an Image or Icon is present. (microsoft#28173) chore(react-infobutton): Rename InfoTip to InfoIcon (microsoft#28177) fix(react-datepicker-compat): Make DatePicker Compat stories SSR safe (microsoft#28017) Added `tab` focus mode to the Breadcrumb (microsoft#28046) docs: Add usable documentation (microsoft#28155) applying package updates Fix up rebase code (microsoft#27864) fix: ContextualMenu indexing in sections (microsoft#28127) applying package updates fix: Layer sets focus visible classname for its FocusRectsProvider (microsoft#28157) docs(react-infobutton): Update stories to show better guidance (microsoft#28144) fix(react-avatar): Do not render the image when src prop is undefined (microsoft#28146) feat(react-datepicker-compat): Add null to value prop and handle controlled cases correctly (microsoft#28056)
Previous Behavior
Not applicable, this is a new functionality.
New Behavior
getFileTypeIconAsUrlutility is added to@fluentui/react-file-type-iconspackage. It uses the same implementation as existinggetFileTypeIconAsHTMLString, but instead of returning a string withimgDOM element it returns a raw URL that can be passed to animgelement insrcattribute.Related Issue(s)