Rework Toggle into Toggleable and ToggleState

This commit is contained in:
Marshall Bowers 2023-11-29 14:33:52 -05:00
parent 6f5cc0af94
commit e77846d2dc
10 changed files with 95 additions and 93 deletions

View file

@ -2,7 +2,7 @@ use gpui::{Div, Render};
use story::Story;
use crate::prelude::*;
use crate::{Disclosure, Toggle};
use crate::{Disclosure, ToggleState};
pub struct DisclosureStory;
@ -13,10 +13,8 @@ impl Render for DisclosureStory {
Story::container()
.child(Story::title_for::<Disclosure>())
.child(Story::label("Toggled"))
.child(Disclosure::new(Toggle::Toggled(true)))
.child(Disclosure::new(ToggleState::Toggled))
.child(Story::label("Not Toggled"))
.child(Disclosure::new(Toggle::Toggled(false)))
.child(Story::label("Not Toggleable"))
.child(Disclosure::new(Toggle::NotToggleable))
.child(Disclosure::new(ToggleState::NotToggled))
}
}