input.rs

 1#[cfg(feature = "stories")]
 2pub use stories::*;
 3
 4#[cfg(feature = "stories")]
 5mod stories {
 6    use super::*;
 7    use crate::Story;
 8    use gpui::{Div, Render};
 9
10    pub struct InputStory;
11
12    impl Render for InputStory {
13        type Element = Div;
14
15        fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
16            Story::container(cx)
17                .child(Story::title_for::<Input>(cx))
18                .child(Story::label(cx, "Default"))
19                .child(div().flex().child(Input::new("Search")))
20        }
21    }
22}