ui: Make Callout constructors more flexible (#29895)

This PR updates the `Callout` constructors to be more flexible by
accepting `impl Into<SharedString>`s.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-05-04 21:18:48 -04:00 committed by GitHub
parent a2fa10f35f
commit 3e2abbf53b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 22 deletions

View file

@ -1093,10 +1093,10 @@ impl MessageEditor {
Some(
div()
.child(ui::Callout::multi_line(
title.into(),
message.into(),
title,
message,
icon,
"Start New Thread".into(),
"Start New Thread",
Box::new(cx.listener(|this, _, window, cx| {
let from_thread_id = Some(this.thread.read(cx).id().clone());
window.dispatch_action(Box::new(NewThread { from_thread_id }), cx);

View file

@ -93,10 +93,10 @@ impl RenderOnce for UsageCallout {
};
Callout::multi_line(
title.into(),
message.into(),
title,
message,
icon,
button_text.into(),
button_text,
Box::new(move |_, _, cx| {
cx.open_url(url);
}),