musichoard/src/tui/ui/error.rs
Wojciech Kozlowski c38961c3c1
All checks were successful
Cargo CI / Build and Test (push) Successful in 1m59s
Cargo CI / Lint (push) Successful in 1m5s
Split ui.rs into modules based on UI element (#200)
Closes #135

Reviewed-on: #200
2024-08-29 17:21:52 +02:00

15 lines
284 B
Rust

use ratatui::{
layout::Alignment,
widgets::{Paragraph, Wrap},
};
pub struct ErrorOverlay;
impl ErrorOverlay {
pub fn paragraph(msg: &str) -> Paragraph {
Paragraph::new(msg)
.alignment(Alignment::Center)
.wrap(Wrap { trim: true })
}
}