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