ZIm/crates/ui/src/components.rs
Nate Butler 19d6e067af
Toggle & Switch (#21979)
![CleanShot 2024-12-13 at 11 27
39@2x](https://github.com/user-attachments/assets/7c7828c0-c5c7-4dc6-931e-722366d4f15a)

- Adds the Switch component
- Updates `Selected`, `Selectable` -> `ToggleState`, `Toggleable`
- Adds `checkbox` and `switch` functions to align better with other
elements in our layout system.

We decided not to merge Switch and Checkbox. However, in a followup I'll
introduce a Toggle or AnyToggle enum so we can update
`CheckboxWithLabel` -> `ToggleWithLabel` as this component will work
exactly the same with either a Checkbox or a Switch.

Release Notes:

- N/A
2024-12-13 14:23:02 -05:00

73 lines
1.3 KiB
Rust

mod avatar;
mod button;
mod content_group;
mod context_menu;
mod disclosure;
mod divider;
mod dropdown_menu;
mod facepile;
mod icon;
mod image;
mod indent_guides;
mod indicator;
mod keybinding;
mod label;
mod list;
mod modal;
mod navigable;
mod numeric_stepper;
mod popover;
mod popover_menu;
mod radio;
mod right_click_menu;
mod scrollbar;
mod settings_container;
mod settings_group;
mod stack;
mod tab;
mod tab_bar;
mod table;
mod toggle;
mod tool_strip;
mod tooltip;
#[cfg(feature = "stories")]
mod stories;
pub use avatar::*;
pub use button::*;
pub use content_group::*;
pub use context_menu::*;
pub use disclosure::*;
pub use divider::*;
pub use dropdown_menu::*;
pub use facepile::*;
pub use icon::*;
pub use image::*;
pub use indent_guides::*;
pub use indicator::*;
pub use keybinding::*;
pub use label::*;
pub use list::*;
pub use modal::*;
pub use navigable::*;
pub use numeric_stepper::*;
pub use popover::*;
pub use popover_menu::*;
pub use radio::*;
pub use right_click_menu::*;
pub use scrollbar::*;
pub use settings_container::*;
pub use settings_group::*;
pub use stack::*;
pub use tab::*;
pub use tab_bar::*;
pub use table::*;
pub use toggle::*;
pub use tool_strip::*;
pub use tooltip::*;
#[cfg(feature = "stories")]
pub use image::story::*;
#[cfg(feature = "stories")]
pub use stories::*;