Use children
instead of label
in dcc.Tab
? #247
Description
In Dash, the only property that can accept arbitrary components is the children
property.
I think we should add support for children
in dcc.Tab
, rather than label. That is:
dcc.Tab(
children=html.Div(...)
)
rather than
dcc.Tab(
label='Tab 2'
)
This will allow our users to render more flexible content within their tab. I imagine most folks will just use the default styles and just pass in text, but if we allow children
then users could pass in more flexible content like images or icons.
This was originally mentioned in #213 (comment) but it looks like it wasn't clear enough. In this commit, the propType changed but I was actually referring to the property name itself: 8583ec6#diff-e23b57179f41430c617387f03d67ca9fR21
Since we've released, we have to keep supporting the label
property. So, we'll have to check if children
is supplied and if not, use the existing label