Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Document free functions
Nate Butlerc19551d97465
diff --git a/crates/ui/src/components/popover_menu.rs b/crates/ui/src/components/popover_menu.rsindex fb823b05dba..6bfc88bbec3 100644--- a/crates/ui/src/components/popover_menu.rs+++ b/crates/ui/src/components/popover_menu.rs@@ -108,6 +108,7 @@ impl<M: ManagedView> PopoverMenu<M> {}}+/// Creates a [PopoverMenu]pub fn popover_menu<M: ManagedView>(id: impl Into<ElementId>) -> PopoverMenu<M> {PopoverMenu {id: id.into(),diff --git a/crates/ui/src/components/right_click_menu.rs b/crates/ui/src/components/right_click_menu.rsindex 8bf40f61a82..282884c948b 100644--- a/crates/ui/src/components/right_click_menu.rs+++ b/crates/ui/src/components/right_click_menu.rs@@ -39,6 +39,7 @@ impl<M: ManagedView> RightClickMenu<M> {}}+/// Creates a [RightClickMenu]pub fn right_click_menu<M: ManagedView>(id: impl Into<ElementId>) -> RightClickMenu<M> {RightClickMenu {id: id.into(),diff --git a/crates/ui/src/components/stack.rs b/crates/ui/src/components/stack.rsindex a6321b93d7c..76f08de911e 100644--- a/crates/ui/src/components/stack.rs+++ b/crates/ui/src/components/stack.rs@@ -2,17 +2,13 @@ use gpui::{div, Div};use crate::StyledExt;-/// Horizontally stacks elements.-///-/// Sets `flex()`, `flex_row()`, `items_center()`+/// Horizontally stacks elements. Sets `flex()`, `flex_row()`, `items_center()`#[track_caller]pub fn h_stack() -> Div {div().h_flex()}-/// Vertically stacks elements.-///-/// Sets `flex()`, `flex_col()`+/// Vertically stacks elements. Sets `flex()`, `flex_col()`#[track_caller]pub fn v_stack() -> Div {div().v_flex()