A toggle switch with default configuration.
(on: impl Binding<bool>)
| 116 | |
| 117 | /// A toggle switch with default configuration. |
| 118 | pub fn toggle(on: impl Binding<bool>) -> impl View { |
| 119 | toggle_with_config(on, ToggleConfig::default()) |
| 120 | } |
| 121 | #[cfg(test)] |
| 122 | mod tests { |
| 123 |