[Bug]: content
property is name clashing between react types and some v9 components
#29596
Labels
Component: AvatarGroup
AvatarGroup component.
Component: MenuItem
Component: Table
Fluent UI react-components (v9)
Status: In PR
Library
React Components / v9 (@fluentui/react-components)
Bug Description
Seems like
@types/react
defines thatcontent
is a valid property that acceptsstring | undefined
as it's type onHTMLAttributes
interface:https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/v17/index.d.ts#L1876
This interface is one of the building blocks of every native element property declaration, which mean that every single one of v9 component that have a well defined root as a native element, have this property declared by
HTMLAttributes
interface. In these components:This will be a problem, as
content
is also a sot declaration, which will cause a clash between native element types and the slot definition, making the slot virtually equivalent tostring | undefined
, here's an example withMenuItem
https://codesandbox.io/s/loving-hill-9t3t5z?file=/example.tsxThe text was updated successfully, but these errors were encountered: