fix: responsive menu layout

This commit is contained in:
Ashley Wulber 2026-02-22 20:48:11 -05:00
parent 152ef0b011
commit 5827fdd054
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
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();