StatusPill API
Every prop of the 2 parts StatusPill exports, plus each of the 5 symbols it exports alongside them, generated from the package manifest.
import { StatusDot, StatusPill } from '@oceanic-hub/brand-system'- Layer
- patterns — Generic composites — the shared shell and the shared status vocabulary that make every product inherit the look. The reason this package exists.
- Exports
- StatusDot · StatusPillalso: statusPillVariants · CAP_STATUS_LABEL · HEALTH_STATUS_LABEL · RENDER_STATUS_TONE · TASK_STATUS_LABELtypes: CapStatus · HealthStatus · RenderStatus · StatusAxis · StatusDotProps · StatusPillAxisProps · StatusPillBaseProps · StatusPillProps · StatusTone · TaskStatus
- Variants
- tone: done | info | neutral | stuck | working
- size: default | sm
- variant: soft | solid
- tone: done | working | stuck | info | neutral
- renderStatus: draft | error | queued | ready | rendering
- size: default | sm
- axis: cap | health | task
- status: at-risk | done | healthy | near | needs-attention | over | stuck | under | working
- Contract
- packages/brand-system/src/components/status-pill.contract.test-d.ts
- Demos
- 10 on the StatusPill page — rendered live, hydrated
- Source
- packages/brand-system/src/components/status-pill.tsx
Generated from manifest/component-manifest.json, so it cannot drift from the source. For what StatusPill is for, how it composes and what it looks like, see StatusPill.
StatusDot
StatusDotProps
Prop
Type
Also accepts everything from React.HTMLAttributes<HTMLSpanElement>.
StatusPill
StatusPillProps
Prop
Type
Also accepts everything from Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'>, VariantProps<typeof statusPillVariants>.
statusPillVariants
A cva class builder. It returns the class string for a set of variants, so a foreign element can wear this component's surface — a link styled as a button, an AlertDialogAction styled as a destructive one. An advanced move: reach for the component first.
(props?: ({ variant?: "soft" | "solid" | null | undefined; tone?: "done" | "info" | "working" | "stuck" | "neutral" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined): stringParameters
Prop
Type
Variant axes
Read off the component's own cva config, so this table and the parts that consume it cannot disagree.
Prop
Type
CAP_STATUS_LABEL
A constant. Exported so a consumer can read the vocabulary this package already uses instead of restating it — and so the two cannot drift apart.
const CAP_STATUS_LABEL: { readonly under: "Under cap"; readonly near: "Near cap"; readonly over: "Over cap"; }HEALTH_STATUS_LABEL
A constant. Exported so a consumer can read the vocabulary this package already uses instead of restating it — and so the two cannot drift apart.
const HEALTH_STATUS_LABEL: { readonly healthy: "Healthy"; readonly 'needs-attention': "Needs attention"; readonly 'at-risk': "At risk"; }RENDER_STATUS_TONE
A constant. Exported so a consumer can read the vocabulary this package already uses instead of restating it — and so the two cannot drift apart.
const RENDER_STATUS_TONE: { readonly draft: "neutral"; readonly queued: "info"; readonly rendering: "working"; readonly ready: "done"; readonly error: "stuck"; }TASK_STATUS_LABEL
A constant. Exported so a consumer can read the vocabulary this package already uses instead of restating it — and so the two cannot drift apart.
const TASK_STATUS_LABEL: { readonly done: "Done"; readonly working: "Working on it"; readonly stuck: "Stuck"; }