diff --git a/crates/storybook/src/collab_panel.rs b/crates/storybook/src/collab_panel.rs index f38668368611044ecbd03e98db49e0ba4ac4c4d4..429529b3c18c22414810d06a1f8d15c52e045754 100644 --- a/crates/storybook/src/collab_panel.rs +++ b/crates/storybook/src/collab_panel.rs @@ -44,7 +44,7 @@ impl CollabPanelElement { //:: https://tailwindcss.com/docs/hover-focus-and-other-states#styling-based-on-parent-state // .group() // List Section Header - .child(self.list_section_header("#CRDB", theme)) + .child(self.list_section_header("#CRDB", true, theme)) // List Item Large .child(self.list_item("maxbrunsfeld", theme)), ) @@ -53,14 +53,14 @@ impl CollabPanelElement { .py_2() .flex() .flex_col() - .child(self.list_section_header("CHANNELS", theme)), + .child(self.list_section_header("CHANNELS", true, theme)), ) .child( div() .py_2() .flex() .flex_col() - .child(self.list_section_header("CONTACTS", theme)) + .child(self.list_section_header("CONTACTS", true, theme)) .child(self.list_item("as-cii", theme)) .child(self.list_item("nathansobo", theme)) .child(self.list_item("maxbrunsfeld", theme)), @@ -79,6 +79,7 @@ impl CollabPanelElement { fn list_section_header( &self, label: impl Into>, + expanded: bool, theme: &Theme, ) -> impl Element { div() @@ -91,7 +92,11 @@ impl CollabPanelElement { .child( div().flex().h_full().gap_1().items_center().child( svg() - .path("icons/radix/caret-down.svg") + .path(if expanded { + "icons/radix/caret-down.svg" + } else { + "icons/radix/caret-up.svg" + }) .w_3p5() .h_3p5() .fill(theme.middle.positive.default.foreground),