[HELP] Styling/accessing children of components through prop passed to the parent component #368
-
In the case of the <div class="tabs">
<ul>
<li>
<span>
...
</span>
</li>
</ul>
</div> is there any way to style the This can be also applicable in other cases:
Any ideas, suggestions are more than welcome, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
There's currently no direct way to style the underlying .my-tab > ul {
/* your style here */
} then pass the class name to the <Tabs
className="my-tab" /> |
Beta Was this translation helpful? Give feedback.
-
@kennethnym thanks for the response, indeed the css is a good solution for this, just wanted to get a confirmation that there is no other direct way to achieve this. |
Beta Was this translation helpful? Give feedback.
-
I'll transfer this into discussion to clean up the issue section a little bit. |
Beta Was this translation helpful? Give feedback.
There's currently no direct way to style the underlying
<ul>
component. You can use CSS selectors to select it from the parent element:then pass the class name to the
Tabs
component: