bezel

Components / Status

Status dot

Markdown crates/ui/src/widgets/mod.rs docs.rs

use ui::widgets;

widgets::status_dot(theme.success)
widgets::status_dot(theme.busy)
widgets::status_dot(theme.danger)

"Working", "idle", "failed" are the caller's domain, so the mapping from a state to a tone stays there rather than becoming an enum every app has to translate.

API

// ui::widgets

/// A 6px bead. The tones worth reaching for are `success`, `busy`, `warning`,
/// `danger`, and `text_faint` for one that means nothing yet.
pub fn status_dot(tone: gpui::Hsla) -> gpui::Div;

// ...
Status dot