ui: Implement ParentElement for Banner (#29834)
This PR implements the `ParentElement` trait for the `Banner` component so that it can use the real children APIs instead of a bespoke one. Release Notes: - N/A
This commit is contained in:
@@ -1890,7 +1890,7 @@ impl AssistantPanel {
|
||||
.child(
|
||||
Banner::new()
|
||||
.severity(ui::Severity::Warning)
|
||||
.children(
|
||||
.child(
|
||||
Label::new(
|
||||
"Configure at least one LLM provider to start using the panel.",
|
||||
)
|
||||
@@ -1923,7 +1923,7 @@ impl AssistantPanel {
|
||||
.child(
|
||||
Banner::new()
|
||||
.severity(ui::Severity::Warning)
|
||||
.children(
|
||||
.child(
|
||||
h_flex()
|
||||
.w_full()
|
||||
.children(
|
||||
@@ -1985,7 +1985,7 @@ impl AssistantPanel {
|
||||
Some(
|
||||
Banner::new()
|
||||
.severity(ui::Severity::Info)
|
||||
.children(h_flex().child(Label::new(format!(
|
||||
.child(h_flex().child(Label::new(format!(
|
||||
"Consecutive tool use limit reached.{max_mode_upsell}"
|
||||
))))
|
||||
.into_any_element(),
|
||||
|
||||
@@ -66,7 +66,7 @@ impl RenderOnce for UsageBanner {
|
||||
}),
|
||||
};
|
||||
|
||||
Banner::new().severity(severity).children(
|
||||
Banner::new().severity(severity).child(
|
||||
h_flex().flex_1().gap_1().child(Label::new(message)).child(
|
||||
h_flex()
|
||||
.flex_1()
|
||||
|
||||
Reference in New Issue
Block a user