-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tab] children are not accepted, even though docs state "Any other properties supplied will be spread to the root element" #11860
Comments
I guess we should document that there is no children property, and warn if someone tries to us it?
I think that it can be better handled with the |
I don't see a It's certainly possible to pass the children through, as I do in my PR. |
@jedwards1211 The
I have two issues with that.
<Tab component={props => <button {...props}><Prefix />{props.children}<Sufix /></button>} />
|
Ah right, I forgot that |
Wait, shouldn't we warn or document the missing children support? |
Ah, yes that's true |
Expected Behavior
The docs for
Tab
say:Therefore if I render
all of those children get spread to the
ButtonBase
.Current Behavior
The
children
are not spread to theButtonBase
or rendered in any way. The docs lie...Steps to Reproduce (for bugs)
https://codesandbox.io/s/wo977lzr98
Context
I need to put both a progress spinner and a delete button on a tab, but
Tab
only provideslabel
andicon
properties, which is a bit annoying, because this looks gross:Your Environment
The text was updated successfully, but these errors were encountered: