From ee3cd780e21260257b401c3f5cbababd9e27a15a Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Wed, 13 Aug 2025 07:50:21 +0000 Subject: task-073 Co-authored-by: Joe Carstairs Reviewed-on: https://git.joeac.net/joeac/schist/pulls/1 Co-authored-by: Joe Carstairs Co-committed-by: Joe Carstairs --- schist_desktop_gui/src/gui/components/text.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 schist_desktop_gui/src/gui/components/text.rs (limited to 'schist_desktop_gui/src/gui/components/text.rs') diff --git a/schist_desktop_gui/src/gui/components/text.rs b/schist_desktop_gui/src/gui/components/text.rs new file mode 100644 index 0000000..d334de3 --- /dev/null +++ b/schist_desktop_gui/src/gui/components/text.rs @@ -0,0 +1,22 @@ +use iced::Element; + +use crate::gui::components::navigation; + +#[derive(Clone, Debug, PartialEq)] +pub struct Text { + pub content: String, +} + +impl Text { + pub fn new(group_name: String) -> Self { + Self { + content: group_name.clone(), + } + } +} + +impl<'a> Into>> for Text { + fn into(self) -> Element<'a, navigation::Message> { + iced::widget::text(self.content.clone()).into() + } +} -- cgit v1.2.3