Looks like the secondaryText propType for Menu.Item resolves to JSX.Element | undefined, but this doesn't allow for strings to be passed without casting. This is a bit misleading, especially since our examples include strings for this prop.
Type 'string' is not assignable to type 'Element | undefined'.ts(2322)
index.d.ts(1494, 3): The expected type comes from property 'secondaryText' which is declared here on type 'IntrinsicAttributes & Without<EnhancerProps, keyof MenuItemOwnProps> & { is?: "div" | undefined; allowUnsafeHref?: boolean | undefined; } & Without<...> & MenuItemOwnProps'
Looks like the
secondaryText
propType forMenu.Item
resolves toJSX.Element | undefined
, but this doesn't allow for strings to be passed without casting. This is a bit misleading, especially since our examples include strings for this prop.See Code Sandbox for a reproduction.