-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Tabs is passing className to both tab-panel and tab-list #3317
Comments
@alecf oof I agree with you that this is not ideal but fixing it fully would require a breaking change (to, say, replace the best we can do in the short term is add a |
yeah, totally get the breaking change... |
@alecf I have been bitten by this before, and had to use attributes in addition to class name to target one of the two "tabs":
|
I like @n1313's solution here. Still open to PRs to add a |
Environment
Steps to reproduce
Actual behavior
className is repeated in both each tab, as well as each panel. There is no way to target just a tab, or just a panel.
This matters especially where parent/child relationships are important, such as with flexbox. In my case I want to flex the panel vertically but NOT flex the tabs...
Expected behavior
Separate className properties for the tab/panel
Possible solution
Separate className properties for the tab/panel
While it's true you could target this with CSS, I feel like other components' support for classNames of subcomponents gives you the control you want without relying quite as much on the internal structure. For example, see
wrapperTagName
,targetClassName
andtargetTagName
inPopover
The text was updated successfully, but these errors were encountered: