TextColor
-> Color
This commit is contained in:
parent
56d45e72cd
commit
453aa5ffd7
24 changed files with 148 additions and 148 deletions
19
crates/ui2/src/components/disclosure.rs
Normal file
19
crates/ui2/src/components/disclosure.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
use gpui::{div, Element, ParentElement};
|
||||
|
||||
use crate::{Color, Icon, IconElement, IconSize, Toggle};
|
||||
|
||||
pub fn disclosure_control(toggle: Toggle) -> impl Element {
|
||||
match (toggle.is_toggleable(), toggle.is_toggled()) {
|
||||
(false, _) => div(),
|
||||
(_, true) => div().child(
|
||||
IconElement::new(Icon::ChevronDown)
|
||||
.color(Color::Muted)
|
||||
.size(IconSize::Small),
|
||||
),
|
||||
(_, false) => div().child(
|
||||
IconElement::new(Icon::ChevronRight)
|
||||
.color(Color::Muted)
|
||||
.size(IconSize::Small),
|
||||
),
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue