story: Fix double border in ResizableStory.

This commit is contained in:
Jason Lee 2025-06-04 18:11:00 +08:00
parent c97cdd7b89
commit 7934e8af31

View file

@ -53,11 +53,9 @@ impl ResizableStory {
}
}
fn panel_box(content: impl Into<SharedString>, cx: &App) -> AnyElement {
fn panel_box(content: impl Into<SharedString>, _: &App) -> AnyElement {
div()
.p_4()
.border_1()
.border_color(cx.theme().border)
.size_full()
.child(content.into())
.into_any_element()
@ -69,7 +67,11 @@ impl Render for ResizableStory {
.size_full()
.gap_6()
.child(
div().h(px(800.)).child(
div()
.h(px(600.))
.border_1()
.border_color(cx.theme().border)
.child(
v_resizable("resizable-1", self.state1.clone())
.group(
h_resizable("resizable-1.1", self.state2.clone())
@ -96,6 +98,11 @@ impl Render for ResizableStory {
),
),
)
.child(
div()
.h(px(400.))
.border_1()
.border_color(cx.theme().border)
.child(
h_resizable("resizable-3", self.state3.clone())
.child(
@ -105,6 +112,7 @@ impl Render for ResizableStory {
.child(panel_box("Left 2", cx)),
)
.child(resizable_panel().child(panel_box("Right (Grow)", cx))),
),
)
}
}