This is a dumb first pass at a standard text example. We'll use this to start digging in to some text/scale rendering issues. There will be a ton of follow-up features to this, but starting simple. Release Notes: - N/A
19 lines
535 B
Rust
19 lines
535 B
Rust
use gpui::Render;
|
|
use story::Story;
|
|
|
|
use crate::Disclosure;
|
|
use crate::prelude::*;
|
|
|
|
pub struct DisclosureStory;
|
|
|
|
impl Render for DisclosureStory {
|
|
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
|
Story::container(cx)
|
|
.child(Story::title_for::<Disclosure>(cx))
|
|
.child(Story::label("Toggled"))
|
|
.child(Disclosure::new("toggled", true))
|
|
.child(Story::label("Not Toggled"))
|
|
.child(Disclosure::new("not_toggled", false))
|
|
}
|
|
}
|