15 lines
284 B
Rust
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 })
|
|
}
|
|
}
|