agent: Fix text wrapping in the provider set up list items (#33063)

Release Notes:

- agent: Fixed text wrapping in the provider set up list items in the
settings view.
This commit is contained in:
Danilo Leal 2025-06-19 18:17:56 -03:00 committed by GitHub
parent ca3f1d624a
commit 2624950472
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,29 +40,30 @@ impl IntoElement for InstructionListItem {
let link = button_link.clone();
let unique_id = SharedString::from(format!("{}-button", self.label));
h_flex().flex_wrap().child(Label::new(self.label)).child(
Button::new(unique_id, button_label)
.style(ButtonStyle::Subtle)
.icon(IconName::ArrowUpRight)
.icon_size(IconSize::XSmall)
.icon_color(Color::Muted)
.on_click(move |_, _window, cx| cx.open_url(&link)),
)
h_flex()
.flex_wrap()
.child(Label::new(self.label))
.child(
Button::new(unique_id, button_label)
.style(ButtonStyle::Subtle)
.icon(IconName::ArrowUpRight)
.icon_size(IconSize::XSmall)
.icon_color(Color::Muted)
.on_click(move |_, _window, cx| cx.open_url(&link)),
)
.into_any_element()
} else {
div().child(Label::new(self.label))
Label::new(self.label).into_any_element()
};
div()
.child(
ListItem::new("list-item")
.selectable(false)
.start_slot(
Icon::new(IconName::Dash)
.size(IconSize::XSmall)
.color(Color::Hidden),
)
.child(item_content),
ListItem::new("list-item")
.selectable(false)
.start_slot(
Icon::new(IconName::Dash)
.size(IconSize::XSmall)
.color(Color::Hidden),
)
.into_any()
.child(div().w_full().child(item_content))
.into_any_element()
}
}