summaryrefslogtreecommitdiffstats
path: root/examples/pure/component/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pure/component/src/main.rs')
-rw-r--r--examples/pure/component/src/main.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/pure/component/src/main.rs b/examples/pure/component/src/main.rs
index b38d6fca..2f98f768 100644
--- a/examples/pure/component/src/main.rs
+++ b/examples/pure/component/src/main.rs
@@ -47,12 +47,13 @@ impl Sandbox for Component {
}
mod numeric_input {
- use iced::pure::{button, row, text, text_input};
use iced_lazy::pure::{self, Component};
use iced_native::alignment::{self, Alignment};
use iced_native::text;
+ use iced_native::widget;
use iced_native::Length;
use iced_pure::Element;
+ use iced_pure::{button, row, text, text_input};
pub struct NumericInput<Message> {
value: Option<u32>,
@@ -88,6 +89,9 @@ mod numeric_input {
impl<Message, Renderer> Component<Message, Renderer> for NumericInput<Message>
where
Renderer: text::Renderer + 'static,
+ Renderer::Theme: widget::button::StyleSheet,
+ <Renderer::Theme as widget::button::StyleSheet>::Variant:
+ Default + Copy,
{
type State = ();
type Event = Event;
@@ -158,6 +162,9 @@ mod numeric_input {
where
Message: 'a,
Renderer: 'static + text::Renderer,
+ Renderer::Theme: widget::button::StyleSheet,
+ <Renderer::Theme as widget::button::StyleSheet>::Variant:
+ Default + Copy,
{
fn from(numeric_input: NumericInput<Message>) -> Self {
pure::component(numeric_input)