ui: Remove support for unnecessary Switch colors (#44388)
This PR removes the default, error, warning, and success color variants from the `SwitchColor` enum. In the most YAGNI spirit, I think we'll probably never want to use these colors for the switch, so there's no reason to support them. And if we ever want to do it, we can re-add them. I also took the opportunity to change the default color to be "accent", which is _already_ what we use for all instances of this component, so there's no need to have to define it every time. This effectively makes the enum support only "accent" and "custom", which I think is okay for now if we ever need an escape hatch before committing to supporting new values. Release Notes: - N/A
This commit is contained in:
@@ -881,7 +881,6 @@ impl ConfigureMode {
|
||||
.label("Stop on Entry")
|
||||
.label_position(SwitchLabelPosition::Start)
|
||||
.label_size(LabelSize::Default)
|
||||
.color(ui::SwitchColor::Accent)
|
||||
.on_click({
|
||||
let this = cx.weak_entity();
|
||||
move |state, _, cx| {
|
||||
|
||||
Reference in New Issue
Block a user