diff_tool/view/
header.rs

1use ratatui::{
2    layout::Rect,
3    style::{Color, Style},
4    widgets::{Block, BorderType, Paragraph},
5    Frame,
6};
7
8pub(super) fn render_header(f: &mut Frame, area: Rect) {
9    let title = draw_title();
10    f.render_widget(title, area);
11}
12
13/// Draws the title component
14fn draw_title<'a>() -> Paragraph<'a> {
15    Paragraph::new("Git Diff View")
16        .style(Style::default().fg(Color::LightCyan))
17        .centered()
18        .block(
19            Block::bordered()
20                .style(Style::default().fg(Color::White))
21                .border_type(BorderType::Plain),
22        )
23}