From cb2490745e594d8125b70da15b0b3ee5c3dadc26 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Mon, 3 Jul 2023 15:53:54 +0200 Subject: [PATCH] Restructure issue page widgets --- src/ui/widget/common.rs | 1 + src/ui/widget/common/form.rs | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/ui/widget/common/form.rs diff --git a/src/ui/widget/common.rs b/src/ui/widget/common.rs index 7947fd3c..bfad2f5f 100644 --- a/src/ui/widget/common.rs +++ b/src/ui/widget/common.rs @@ -1,5 +1,6 @@ pub mod container; pub mod context; +pub mod form; pub mod label; pub mod list; diff --git a/src/ui/widget/common/form.rs b/src/ui/widget/common/form.rs new file mode 100644 index 00000000..31f98dd3 --- /dev/null +++ b/src/ui/widget/common/form.rs @@ -0,0 +1,28 @@ +use std::collections::HashMap; + +use tuirealm::command::{CmdResult, Cmd}; +use tuirealm::tui::layout::Rect; +use tuirealm::{MockComponent, Props, Frame, State}; + +use crate::ui::widget::WidgetComponent; + +struct Form { + inputs: HashMap>, + +} + +impl Form { + +} + +impl WidgetComponent for Form { + fn view(&mut self, _properties: &Props, _frame: &mut Frame, _area: Rect) {} + + fn state(&self) -> State { + State::None + } + + fn perform(&mut self, _properties: &Props, _cmd: Cmd) -> CmdResult { + CmdResult::None + } +} \ No newline at end of file