1use gpui::Render;
2use story::{StoryContainer, StoryItem, StorySection};
3
4use crate::{prelude::*, ToolStrip, Tooltip};
5
6pub struct ToolStripStory;
7
8impl Render for ToolStripStory {
9 fn render(&mut self, _cx: &mut ViewContext<Self>) -> impl IntoElement {
10 StoryContainer::new(
11 "Tool Strip",
12 "crates/ui/src/components/stories/tool_strip.rs",
13 )
14 .child(
15 StorySection::new().child(StoryItem::new(
16 "Vertical Tool Strip",
17 h_flex().child(
18 ToolStrip::vertical("tool_strip_example")
19 .tool(
20 IconButton::new("example_tool", IconName::AudioOn)
21 .tooltip(|cx| Tooltip::text("Example tool", cx)),
22 )
23 .tool(
24 IconButton::new("example_tool_2", IconName::MicMute)
25 .tooltip(|cx| Tooltip::text("Example tool 2", cx)),
26 )
27 .tool(
28 IconButton::new("example_tool_3", IconName::Screen)
29 .tooltip(|cx| Tooltip::text("Example tool 3", cx)),
30 ),
31 ),
32 )),
33 )
34 }
35}