Make tour work with iced_web again 🎉

- Implements `TextInput`, `Scrollable`, and `Container`
- Adds basic style generation
This commit is contained in:
Héctor Ramón Jiménez 2019-11-23 20:23:38 +01:00
parent 3a678561f2
commit d0f79d2779
17 changed files with 882 additions and 69 deletions

View file

@ -140,7 +140,7 @@ pub trait Application: Sized {
<Instance<Self> as iced_winit::Application>::run();
#[cfg(target_arch = "wasm32")]
iced_web::Application::run(Instance(self));
<Instance<Self> as iced_web::Application>::run();
}
}
@ -180,11 +180,21 @@ where
{
type Message = A::Message;
fn update(&mut self, message: Self::Message) {
self.0.update(message);
fn new() -> (Self, Command<A::Message>) {
let (app, command) = A::new();
(Instance(app), command)
}
fn view(&mut self) -> Element<Self::Message> {
fn title(&self) -> String {
self.0.title()
}
fn update(&mut self, message: Self::Message) -> Command<Self::Message> {
self.0.update(message)
}
fn view(&mut self) -> Element<'_, Self::Message> {
self.0.view()
}
}