29 lines
738 B
Rust
29 lines
738 B
Rust
use ratatui::{
|
|
layout::Rect,
|
|
style::Style,
|
|
widgets::{Block, BorderType, Borders, Paragraph},
|
|
Frame,
|
|
};
|
|
|
|
use crate::tui::layout::FocusedArea;
|
|
use crate::tui::theme::THEME;
|
|
|
|
use super::styled_title;
|
|
|
|
pub fn render(frame: &mut Frame, area: Rect, focused: FocusedArea) {
|
|
let color = if focused == FocusedArea::Details {
|
|
THEME.colors.border_focused
|
|
} else {
|
|
THEME.colors.border_unfocused
|
|
};
|
|
|
|
let block = Block::default()
|
|
.title(styled_title("Details", true))
|
|
.borders(Borders::ALL)
|
|
.border_type(BorderType::Rounded)
|
|
.border_style(Style::default().fg(color));
|
|
|
|
let widget = Paragraph::new("TEST CONTENT").block(block);
|
|
frame.render_widget(widget, area);
|
|
}
|