Hi Everybody, would love your help on smoething:
No matter what I do, I can’t get the target width to be bigger (say, 100% of the div).
Would love any help, here is my code:
dmc.HoverCard([
dmc.HoverCardTarget(
html.Div(dmc.Paper([
dmc.Group([
dmc.Avatar(children=DashIconify(icon='mdi:user'),radius='xl',color=color_dict['blue'],style={'border': '1px solid white','backgroundColor':'white'}),
],justify='space-between') if chat_layout else None,
shown_content,
reference_div if chat_layout else None,
attchment_div if chat_layout else None,
tools_div if chat_layout else None,
],
radius='lg',
withBorder=True if chat_layout else False,
p='sm',
shadow = 'xs' if chat_layout else None,
style={
'backgroundColor': color_dict['blue'],
'marginLeft': 'auto',
'marginRight': 5,
# 'maxWidth': '85%',
'width': 'fit-content', # <—— ADD THIS
'display': 'block' # <—— ADD THIS
} if chat_layout else
{'display': 'flex','justifyContent': 'center', 'width': '100%','direction':language_dict[i['metadata']['language']]['direction']}),
style={'display': 'flex', 'justifyContent': 'flex-end', 'width': '100%'}
),
),
dmc.HoverCardDropdown(
dmc.Group([
dmc.ActionIcon(DashIconify(icon='mdi:pencil'),id={'type':'edit','index':str(n)},variant='transparent',color='lightgray',n_clicks=None),
dmc.ActionIcon(DashIconify(icon='mdi:delete'),id={'type':'delete','index':str(n)},variant='transparent',color='red',n_clicks=None),
]),
),
],position='left')


