Skip to content
Domain-Specific

StatusBadge

client25.75 kB
@stellaria/nebula-webStatusBadgeProps

Preview

Props

9
PropTypeDefault

className

string

color

Overrides the colour the map entry asks for. Colour is the status's main signal, so overriding it per call is how two badges end up saying the same word in different colours.

ColorExtended

dot

Overrides whether the map entry shows its dot.

boolean

fullWidth

Stretches the pill to its container instead of hugging the label.

booleanfalse

map

The lookup table, overriding the one from `StatusMapProvider`. Pass it here for a one-off set of statuses; put it on the provider when a whole screen shares the same vocabulary.

Readonly<Record<S, StatusDescriptor>>

radius

How round the pill is.

"sm" | "md" | "full""full"

size

Height, padding and type of the pill together.

Size"md"

status

required

The status key. It is looked up in the map to get the label, the colour and the rest — the key itself is never shown, so a key with no entry in the map has nothing to render.

S

variant

Overrides the variant the map entry asks for. The point of the map is that the status decides its own look, so reach for this only to make one badge sit differently in its surroundings.

BadgeVariant

Also accepts

On top of its own props, this component forwards these groups.

Style props · 127