fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Feature]: IIconProps should extend React.HTMLAttributes<HTMLElement>

Open sydsutton opened this issue 3 years ago • 1 comments

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

image image

Validations

  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

sydsutton avatar Aug 02 '22 17:08 sydsutton

@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

gouttierre avatar Aug 08 '22 11:08 gouttierre

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:

image

layershifter avatar Aug 15 '22 08:08 layershifter

Hey, @layershifter. Thanks for your response. Yes, that is correct.

sydsutton avatar Aug 15 '22 14:08 sydsutton

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.

msft-fluent-ui-bot avatar Feb 11 '23 16:02 msft-fluent-ui-bot