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
parent fd40d173f3
commit 9f52683ebc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 58 additions and 100 deletions

View file

@ -181,7 +181,7 @@ impl Button {
self
}
/// Binds a key combination to the button for keyboard shortcuts.
/// Display the keybinding that triggers the button action.
pub fn key_binding(mut self, key_binding: impl Into<Option<KeyBinding>>) -> Self {
self.key_binding = key_binding.into();
self