diff options
Diffstat (limited to 'src/components/hello_world.rs')
-rw-r--r-- | src/components/hello_world.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/components/hello_world.rs b/src/components/hello_world.rs deleted file mode 100644 index ac9d02b..0000000 --- a/src/components/hello_world.rs +++ /dev/null @@ -1,25 +0,0 @@ -use ratatui::prelude::{Frame, Rect}; -use ratatui::widgets::{Paragraph, Wrap}; - -use crate::component::Component; - -#[derive(Default, Clone)] -pub struct HelloWorld { - pub text: String, -} - -impl Component for HelloWorld { - fn init(&mut self) -> eyre::Result<()> { - self.text = "Hello, world!".to_string(); - Ok(()) - } - - fn render(&mut self, frame: &mut Frame, rect: Rect) -> eyre::Result<()> { - frame.render_widget( - Paragraph::new(self.text.clone()).wrap(Wrap { trim: true }), - rect, - ); - - Ok(()) - } -} |