Draft web runtime and widgets
This commit is contained in:
parent
a97401aed2
commit
27ac85a9d9
16 changed files with 321 additions and 29 deletions
16
web/src/widget/button.rs
Normal file
16
web/src/widget/button.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
use crate::{Element, Widget};
|
||||
|
||||
pub use iced::button::{Class, State};
|
||||
|
||||
pub type Button<'a, Message> = iced::Button<'a, Message>;
|
||||
|
||||
impl<'a, Message> Widget<Message> for Button<'a, Message> {}
|
||||
|
||||
impl<'a, Message> From<Button<'a, Message>> for Element<'a, Message>
|
||||
where
|
||||
Message: 'static,
|
||||
{
|
||||
fn from(button: Button<'a, Message>) -> Element<'a, Message> {
|
||||
Element::new(button)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue