add example
This commit is contained in:
parent
bba4cf323b
commit
70d290b2dc
1 changed files with 9 additions and 5 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use iced::pure::container;
|
||||
use iced::pure::{Element, Sandbox};
|
||||
use iced::{Length, Settings};
|
||||
use iced_lazy::pure::responsive;
|
||||
|
||||
use numeric_input::numeric_input;
|
||||
|
||||
|
|
@ -38,11 +39,14 @@ impl Sandbox for Component {
|
|||
}
|
||||
|
||||
fn view(&self) -> Element<Message> {
|
||||
container(numeric_input(self.value, Message::NumericInputChanged))
|
||||
.padding(20)
|
||||
.height(Length::Fill)
|
||||
.center_y()
|
||||
.into()
|
||||
responsive(|_| {
|
||||
container(numeric_input(self.value, Message::NumericInputChanged))
|
||||
.padding(20)
|
||||
.height(Length::Fill)
|
||||
.center_y()
|
||||
.into()
|
||||
})
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue