Remove the SwitchWithLabel component (#23240)

This PR removes the `SwitchWithLabel` component because we're adding
`label` as a method to `Switch`. Thus, we no longer need an extra
component just to append a label. Additionally, we're also adding
`keybinding` as a method.

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>
This commit is contained in:
Danilo Leal
2025-01-16 12:18:59 -03:00
committed by GitHub
co-authored by Agus Zubiaga
parent fd40d173f3
commit 9f52683ebc
4 changed files with 58 additions and 100 deletions
+1 -2
View File
@@ -6,7 +6,7 @@ use ui::{
element_cell, prelude::*, string_cell, utils::calculate_contrast_ratio, AudioStatus,
Availability, Avatar, AvatarAudioStatusIndicator, AvatarAvailabilityIndicator, ButtonLike,
Checkbox, CheckboxWithLabel, ContentGroup, DecoratedIcon, ElevationIndex, Facepile,
IconDecoration, Indicator, Switch, SwitchWithLabel, Table, TintColor, Tooltip,
IconDecoration, Indicator, Switch, Table, TintColor, Tooltip,
};
use crate::{Item, Workspace};
@@ -379,7 +379,6 @@ impl ThemePreview {
.child(IconDecoration::render_component_previews(cx))
.child(Indicator::render_component_previews(cx))
.child(Switch::render_component_previews(cx))
.child(SwitchWithLabel::render_component_previews(cx))
.child(Table::render_component_previews(cx))
}