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
When implementing the Tabs component I found the documentation not very clear.
The items expect a target value which is later renamed to href when using it in the linkProps
Target shouldn't be used as href since target itself can also be used in a link element to define target="_self" or target="_blank"
It's also not clear that the linkProps function only receives an href prop.
I had to dig into the source code to see why it suddenly was called href instead of target
Where [key: string]: any is the definition of all the custom props you want to add, in case of a react-router-dom link element this would be at least the prop to
The text was updated successfully, but these errors were encountered:
Describe the bug
When implementing the Tabs component I found the documentation not very clear.
The items expect a
target
value which is later renamed tohref
when using it in thelinkProps
Target shouldn't be used as
href
sincetarget
itself can also be used in a link element to definetarget="_self"
ortarget="_blank"
It's also not clear that the
linkProps
function only receives anhref
prop.I had to dig into the source code to see why it suddenly was called
href
instead oftarget
To Reproduce
Look at the docs on here
Expected behavior
Rename
items.target
toitems.href
Add better docs to the linkProps function
Where
[key: string]: any
is the definition of all the custom props you want to add, in case of areact-router-dom
link element this would be at least the propto
The text was updated successfully, but these errors were encountered: