NEW PAGE ADD TABLE
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// src/components/admin.rs
|
||||
pub mod admin_panel;
|
||||
pub mod admin_panel_admin;
|
||||
pub mod add_table;
|
||||
|
||||
pub use admin_panel::*;
|
||||
pub use admin_panel_admin::*;
|
||||
pub use add_table::*;
|
||||
|
||||
32
client/src/components/admin/add_table.rs
Normal file
32
client/src/components/admin/add_table.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
// src/components/admin/add_table.rs
|
||||
use crate::config::colors::themes::Theme;
|
||||
use ratatui::{
|
||||
layout::{Alignment, Rect},
|
||||
style::{Style, Stylize},
|
||||
widgets::{Block, Borders, Paragraph},
|
||||
Frame,
|
||||
};
|
||||
|
||||
/// Renders a placeholder page for adding tables.
|
||||
pub fn render_add_table_page(
|
||||
f: &mut Frame,
|
||||
area: Rect,
|
||||
theme: &Theme,
|
||||
) {
|
||||
let block = Block::default()
|
||||
.title(" Add New Table ")
|
||||
.borders(Borders::ALL)
|
||||
.border_style(Style::default().fg(theme.accent))
|
||||
.style(Style::default().bg(theme.bg));
|
||||
|
||||
let inner_area = block.inner(area);
|
||||
|
||||
let text = Paragraph::new("This is the placeholder page for adding a new table.\n\nDrawing canvas coming soon!")
|
||||
.style(Style::default().fg(theme.fg))
|
||||
.alignment(Alignment::Center);
|
||||
|
||||
f.render_widget(block, area);
|
||||
f.render_widget(text, inner_area);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user