aboutsummaryrefslogtreecommitdiff
path: root/src/components/hello_world.rs
blob: 22c966c86025af288a19207e29f1b952af4999dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use ratatui::prelude::*;
use ratatui::widgets::Paragraph;

use crate::component::Component;

#[derive(Default, Clone)]
pub struct HelloWorld {
    pub text: String,
}

impl Component for HelloWorld {
    fn render(&mut self, frame: &mut Frame, rect: Rect) -> eyre::Result<()> {
        frame.render_widget(Paragraph::new(self.text.clone()), rect);

        Ok(())
    }
}