fluentui
fluentui copied to clipboard
[Feature]: IIconProps should extend React.HTMLAttributes<HTMLElement>
Library
React / v8 (@fluentui/react)
Describe the feature that you would like added
Actual Behavior
According to [https://developer.microsoft.com/en-us/fluentui#/controls/web/icon] IIconProps extends IBaseProps as well as React.HTMLAttributes<HTMLElement> , but in the docs on [https://docs.microsoft.com/en-us/javascript/api/office-ui-fabric-react/iiconprops?view=office-ui-fabric-react-latest] IIconProps only extends IBaseProps.
Expected Behavior
IIconProps should extend both IBaseProps and React.HTMLAttributes<HTMLElement>.
Have you discussed this feature with our team
No response
Additional context

Validations
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@sydsutton - Thanks for filing this issue with us. To set expectations the developers will review this issue once capacity allows.
@tomi-msft - I remember you did work on the icons, would you be able to review the documentation to ensure its completeness? Thank you
cc @layershifter
IIconProps extends both IBaseProps and React.HTMLAttributes:
https://github.com/microsoft/fluentui/blob/958f4e2469b779d6e394fd6885ebd2532c7c229e/packages/react/src/components/Icon/Icon.types.ts#L34-L37
So documentation in https://developer.microsoft.com/en-us/fluentui?fabricVer=8#/controls/web/icon is correct. This is true for both @fluentui/react@v7 & @fluentui/react@v8.
The problem is that React.HTMLAttributes is not visible in https://docs.microsoft.com/en-us/javascript/api/office-ui-fabric-react/iiconprops?view=office-ui-fabric-react-latest:

Hey, @layershifter. Thanks for your response. Yes, that is correct.
Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.
Still require assistance? Please, create a new issue with up-to date details.