ui-cli 0.3.0

A CLI to add components to your app.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mod app;
mod crossterm;
mod header;
mod tabs;
mod widgets;

use std::time::Duration;

use crate::shared::cli_error::{CliError, CliResult};

/// Run the ratatui TUI for adding components
/// Returns the selected components when user confirms
pub fn run_tui(components: Vec<String>) -> CliResult<Vec<String>> {
    let tick_rate = Duration::from_millis(250);
    crossterm::run(tick_rate, components).map_err(|err| CliError::Io { source: std::io::Error::other(err.to_string()) })
}