fix: responsive menu layout

This commit is contained in:
Ashley Wulber 2026-02-22 20:48:11 -05:00
parent 0d37dc69e3
commit 71e2c7c99e
5 changed files with 45 additions and 13 deletions

View file

@ -139,6 +139,11 @@ impl<'a, Message> Toggler<'a, Message> {
self
}
pub fn on_toggle_maybe(mut self, on_toggle: Option<impl Fn(bool) -> Message + 'a>) -> Self {
self.on_toggle = on_toggle.map(|t| Box::new(t) as _);
self
}
/// Sets the label of the [`Button`].
pub fn label(mut self, label: impl Into<Option<String>>) -> Self {
self.label = label.into();