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:
parent
a2fa10f35f
commit
3e2abbf53b
3 changed files with 23 additions and 22 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue