Open
Description
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 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
To Reproduce
Look at the docs on here
Expected behavior
Rename items.target
to items.href
type TabItems = {
name: string,
href: string,
active?: boolean,
disabled?: boolean
}[];
Add better docs to the linkProps function
linkProps = ({ href: string }) => { component: React.Node, [key: string]: any }
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
Metadata
Metadata
Assignees
Labels
No labels