Rework List to use children (#3369)
This PR reworks the `List` component to use `children` instead of accepting a `Vec<ListItem>` in its constructor. This is a step towards making the `List` component more open. Release Notes: - N/A
This commit is contained in:
@@ -719,10 +719,10 @@ impl Render<Self> for PanelButtons {
|
||||
{
|
||||
let panel = panel.clone();
|
||||
menu = menu.entry(
|
||||
ListEntry::new(Label::new(format!(
|
||||
"Dock {}",
|
||||
position.to_label()
|
||||
))),
|
||||
ListEntry::new(
|
||||
SharedString::from(format!("dock-{position:?}")),
|
||||
Label::new(format!("Dock {}", position.to_label())),
|
||||
),
|
||||
move |_, cx| {
|
||||
panel.set_position(position, cx);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user