Hello,
I’m using images in the dcc.RadioItems component, however, the images are not coming out aligned with the component on the same line. I don’t know what’s going on, I think it could be something simple, but I can’t see it, can someone help me?
app.layout = dcc.RadioItems(
[
{
"label": html.Div(
[
html.Img(src="/assets/images/barras.png", height=35),
html.Div("Bar", style={'font-size': 15,'padding-left': 10}),
], style={'display': 'flex', 'flex-direction': 'row', 'align-items': 'center', 'justify-content': 'left'}
),
"value": "Bar",
},
{
"label": html.Div(
[
html.Img(src="/assets/images/bar_group.png", height=35),
html.Div("Group Bar", style={'font-size': 15, 'padding-left': 10}),
], style={'display': 'flex', 'flex-direction': 'row', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
),
"value": "Group Bar",
},
{
"label": html.Div(
[
html.Img(src="/assets/images/linhas.png", height=35),
html.Div("Line", style={'font-size': 15, 'padding-left': 10}),
], style={'display': 'flex', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
),
"value": "Line",
},
{
"label": html.Div(
[
html.Img(src="/assets/images/pizza_2.png", height=35),
html.Div("Pie", style={'font-size': 15, 'padding-left': 10}),
], style={'display': 'flex', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
),
"value": "Pizza",
},
{
"label": html.Div(
[
html.Img(src="/assets/images/rosca_2.png", height=35),
html.Div("Pie 2", style={'font-size': 15, 'padding-left': 10}),
], style={'display': 'flex', 'align-items': 'center', 'justify-content': 'left','padding-left': 10}
),
"value": "Pie",
},
]
)