status
Builds Callout StatusDot StatusLine


The code that drew it
A still frame holds a repeating animation at its first frame and a one-shot at its last, because a still of a moving thing is not reproducible. Run the gallery to review motion.
fn status(_window: &mut Window, cx: &mut App) -> AnyElement {
let theme = cx.theme().clone();
stack(&theme)
.child(
row(&theme)
.child(StatusDot::new(Tone::Success))
.child(StatusDot::new(Tone::Warning))
.child(StatusDot::new(Tone::Danger))
.child(StatusDot::new(Tone::Neutral)),
)
.child(
StatusLine::new("Connected", Tone::Success).id("scene.status.line"),
)
.child(
Callout::new(
"The host refused this action. The refusal is shown, not converted to an empty state.",
Tone::Danger,
)
.id("scene.status.refusal"),
)
.child(
Callout::new("Refreshing failed. The last verified value remains visible.", Tone::Warning)
.id("scene.status.stale"),
)
.into_any_element()
}