pub fn button<'a, Message, Theme, Renderer>(
content: impl Into<Element<'a, Message, Theme, Renderer>>,
) -> Button<'a, Message, Theme, Renderer>
Expand description
Creates a new Button
with the provided content.
§Example
use iced::widget::button;
#[derive(Clone)]
enum Message {
ButtonPressed,
}
fn view(state: &State) -> Element<'_, Message> {
button("Press me!").on_press(Message::ButtonPressed).into()
}