stynx_code_tui/dialogs/
theme_picker.rs1use crate::state::{AppState, DialogOption, SelectKind};
2use crate::theme;
3
4pub fn open_theme_picker(state: &mut AppState) {
5 let current = theme::current().id.to_string();
6 let options: Vec<DialogOption> = theme::THEMES
7 .iter()
8 .map(|t| {
9 DialogOption::new(t.id, t.name)
10 .with_category("Theme")
11 })
12 .collect();
13 state.modal.open_select(
14 SelectKind::ThemePicker,
15 "Themes",
16 options,
17 Some(current),
18 Some("↵ apply".to_string()),
19 );
20}