1use gpui::Render;
2use story::{Story, 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 Story::container()
11 .child(Story::title_for::<ToolStrip>())
12 .child(
13 StorySection::new().child(StoryItem::new(
14 "Vertical Tool Strip",
15 h_flex().child(
16 ToolStrip::vertical("tool_strip_example")
17 .tool(
18 IconButton::new("example_tool", IconName::AudioOn)
19 .tooltip(|cx| Tooltip::text("Example tool", cx)),
20 )
21 .tool(
22 IconButton::new("example_tool_2", IconName::MicMute)
23 .tooltip(|cx| Tooltip::text("Example tool 2", cx)),
24 )
25 .tool(
26 IconButton::new("example_tool_3", IconName::Screen)
27 .tooltip(|cx| Tooltip::text("Example tool 3", cx)),
28 ),
29 ),
30 )),
31 )
32 }
33}