Remove unneeded constructors for stories

This commit is contained in:
Marshall Bowers 2023-10-26 16:46:49 +02:00
parent 65045b9c52
commit 61694bba6a
33 changed files with 62 additions and 227 deletions

View file

@ -57,7 +57,10 @@ impl<V: 'static> IconButton<V> {
self
}
pub fn on_click(mut self, handler: impl 'static + Fn(&mut V, &mut ViewContext<V>) + Send + Sync) -> Self {
pub fn on_click(
mut self,
handler: impl 'static + Fn(&mut V, &mut ViewContext<V>) + Send + Sync,
) -> Self {
self.handlers.click = Some(Arc::new(handler));
self
}