1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use ratatui::{
    layout::Rect,
    style::{Color, Style},
    widgets::{Block, BorderType, Paragraph},
    Frame,
};

pub(super) fn render_header(f: &mut Frame, area: Rect) {
    let title = draw_title();
    f.render_widget(title, area);
}

/// Draws the title component
fn draw_title<'a>() -> Paragraph<'a> {
    Paragraph::new("Git Diff View")
        .style(Style::default().fg(Color::LightCyan))
        .centered()
        .block(
            Block::bordered()
                .style(Style::default().fg(Color::White))
                .border_type(BorderType::Plain),
        )
}