You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The navigationItems props expects an array of items with a LinkProps objects containing a to field. The problem is that my Link component uses an href prop. Using that in LinkProps produces the following TS error:
Types of property 'LinkProps' are incompatible. Property 'to' is missing in type '{ href: string; }' but required in type '{ to: string; }'.
My Link component's href prop is extended directly from @mui/material/Link's LinkProps.
To Reproduce
Pass in a LinkComponent that uses any prop other than to for its href value.
Expected behavior
The AppBarNavigation component should not produce a TS error when a Link component uses a non-to prop. Ideally, it should not be prescriptive about the Link component's API at all (either through leveraging generics, accepting React elements directly w/ props set by the library consumer, or some other method).
The text was updated successfully, but these errors were encountered:
Describe the bug
The
navigationItems
props expects an array of items with aLinkProps
objects containing ato
field. The problem is that my Link component uses anhref
prop. Using that inLinkProps
produces the following TS error:And my
navigationItems
array looks like:My
Link
component'shref
prop is extended directly from@mui/material/Link
'sLinkProps
.To Reproduce
Pass in a LinkComponent that uses any prop other than
to
for its href value.Expected behavior
The
AppBarNavigation
component should not produce a TS error when a Link component uses a non-to
prop. Ideally, it should not be prescriptive about the Link component's API at all (either through leveraging generics, accepting React elements directly w/ props set by the library consumer, or some other method).The text was updated successfully, but these errors were encountered: