use owo_colors::{OwoColorize, Style};
pub fn skill_name() -> Style {
Style::new().cyan().bold()
}
pub fn heading() -> Style {
Style::new().white().bold()
}
pub fn label() -> Style {
Style::new().blue()
}
pub fn description() -> Style {
Style::new().dimmed()
}
pub fn path() -> Style {
Style::new().white()
}
pub fn tool_tag() -> Style {
Style::new().dimmed()
}
pub fn status_synced() -> Style {
Style::new().green()
}
pub fn status_modified() -> Style {
Style::new().yellow()
}
pub fn status_error() -> Style {
Style::new().red()
}
pub fn warning_heading() -> Style {
Style::new().yellow().bold()
}
pub fn warning() -> Style {
Style::new().yellow()
}
pub fn fmt_skill_name(name: &str, use_color: bool) -> String {
if use_color {
name.style(skill_name()).to_string()
} else {
name.to_string()
}
}
pub fn fmt_heading(text: &str, use_color: bool) -> String {
if use_color {
text.style(heading()).to_string()
} else {
text.to_string()
}
}
pub fn fmt_label(text: &str, use_color: bool) -> String {
if use_color {
text.style(label()).to_string()
} else {
text.to_string()
}
}
pub fn fmt_description(text: &str, use_color: bool) -> String {
if use_color {
text.style(description()).to_string()
} else {
text.to_string()
}
}
pub fn fmt_path(text: &str, use_color: bool) -> String {
if use_color {
text.style(path()).to_string()
} else {
text.to_string()
}
}
pub fn fmt_tool_tag(text: &str, use_color: bool) -> String {
if use_color {
text.style(tool_tag()).to_string()
} else {
text.to_string()
}
}
pub fn fmt_warning_heading(text: &str, use_color: bool) -> String {
if use_color {
text.style(warning_heading()).to_string()
} else {
text.to_string()
}
}
pub fn fmt_warning(text: &str, use_color: bool) -> String {
if use_color {
text.style(warning()).to_string()
} else {
text.to_string()
}
}