input.rs

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