Files
Steckbrett/src/ui/exitPrompt.rs
Phani Pavan K 7b11193b15
All checks were successful
/ Quality Check (push) Successful in 1m38s
/ Build (push) Successful in 1m57s
implemented lifetimes properly
2025-11-02 08:20:44 +05:30

24 lines
726 B
Rust

use ratatui::{
style::{Color, Style},
text::{Line, Text},
widgets::{Block, Borders, Paragraph, Wrap},
};
pub fn getExitPara<'a>() -> Paragraph<'a> {
let exitPopup = Block::default()
.title("Exit Window")
.borders(Borders::ALL)
.style(Style::default().bg(Color::Rgb(42, 61, 69)))
.border_style(Style::default().fg(Color::Red));
let exitText = Text::from(vec![
Line::from("Exit the app?"),
Line::from("ANY UNSAVED CHANGES WILL BE DISCARDED."),
Line::from("Press (s) to save from the main screen."),
]);
Paragraph::new(exitText)
.block(exitPopup)
.wrap(Wrap { trim: false })
.style(Style::default().fg(Color::White))
}