fix: responsive menu layout
This commit is contained in:
parent
0d37dc69e3
commit
71e2c7c99e
5 changed files with 45 additions and 13 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue