src/structs/states.rs
23 lines · 472 bytes
1use tui::layout::Constraint;
2
3use crate::app::pages::{global::GlobalItem, main_menu::MainMenuItem, item_info::ItemInfoItem};
4
5#[derive(Debug, Clone)]
6pub enum Item {
7 Global(GlobalItem),
8 MainMenu(MainMenuItem),
9 ItemInfo(ItemInfoItem),
10}
11
12#[derive(Debug, Clone)]
13pub struct Row {
14 pub items: Vec<RowItem>,
15 pub centered: bool,
16 pub height: Constraint,
17}
18
19#[derive(Debug, Clone)]
20pub struct RowItem {
21 pub item: Item,
22 pub constraint: Constraint,
23}