aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 19cfd96..3c59699 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -30,6 +30,7 @@ where
/// [`Button`]: https://docs.rs/iced/0.13.1/iced/widget/struct.Button.html
pub fn button<'a, Message, Theme, Renderer>(
content: &'a str,
+ message: Message,
) -> Button<'a, Message, Theme, Renderer>
where
Theme: 'a + iced_widget::button::Catalog + text::Catalog,
@@ -41,6 +42,7 @@ where
.line_height(text::LineHeight::Absolute(core::Pixels(20.0)))
.align_x(Horizontal::Center),
)
+ .on_press(message)
.height(32)
.width(core::Length::Fill)
}