From d3327a7c365ab88192f83e14df872f8dcc99bc5c Mon Sep 17 00:00:00 2001 From: doryan Date: Wed, 14 Aug 2024 18:53:27 +0400 Subject: [PATCH] feat(input): add generic type for other input components --- src/view/components/input.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/view/components/input.rs b/src/view/components/input.rs index a855c53..1122208 100644 --- a/src/view/components/input.rs +++ b/src/view/components/input.rs @@ -41,9 +41,9 @@ macro_rules! build_for { } #[derive(Clone, Debug)] -pub struct Input { +pub struct Input { component: Box, - input: TextView, + input: I, input_label: Label, input_frame: Frame, } @@ -54,7 +54,7 @@ pub struct InputBuilder { margins: MarginData, } -impl Product for Input { +impl Product for Input { fn builder() -> InputBuilder { InputBuilder { align: Alignment { @@ -71,13 +71,13 @@ impl Product for Input { } } -impl Input { - pub fn get_input(&self) -> &TextView { - &self.input +impl Input { } pub fn get_frame(&self) -> &Frame { &self.input_frame + pub fn get_input(&self) -> &I { + &self.input } pub fn get_label(&self) -> &Label {