Manta Developers
GitHub
Menu

@manta-eu/react/stat-tiles

Reference for @manta-eu/react/stat-tiles as it is on main.

Type Aliases

StatTile

StatTile = object

Properties

attention?

optional attention?: boolean

Shows a warning dot; screen readers hear attentionLabel.

attentionVariant?

optional attentionVariant?: "warning" | "error"

decimals?

optional decimals?: number

figure?

optional figure?: string

Words shown instead of value, such as a role.

href?

optional href?: string

info?

optional info?: ReactNode

isLoading?

optional isLoading?: boolean

Shows this tile loading while others show figures.

label

label: string

note?

optional note?: string

prefix?

optional prefix?: string

status?

optional status?: StatTileStatus

suffix?

optional suffix?: string

trend?

optional trend?: StatTileTrend

unit?

optional unit?: string

value

value: number


StatTilesProps

StatTilesProps = object

Properties

attentionLabel?

optional attentionLabel?: string

Read after a flagged tile’s label; “needs attention” by default.

className?

optional className?: string

infoLabel?

optional infoLabel?: (tileLabel) => string

Names a tile’s info tip; “About running” by default.

Parameters
tileLabel

string

Returns

string

isLoading?

optional isLoading?: boolean

label

label: string

lead?

optional lead?: "figure" | "label"

The tile’s largest text: the figure (default) or the label, for tiles named by what they track.

linkComponent?

optional linkComponent?: ElementType

The link component, such as a router link; receives href.

tiles

tiles: readonly StatTile[]


StatTileStatus

StatTileStatus = object

Properties

label

label: string

variant

variant: StatusVariant


StatTileTrend

StatTileTrend = object

Properties

at?

optional at?: readonly number[]

Each figure’s x from 0 to 1; evenly spaced by default.

now?

optional now?: number

Today’s index: solid with a Today rule up to it, dotted after. Without it, the last figure gets the dot.

target?

optional target?: number

values

values: readonly number[]

Functions

StatTiles()

StatTiles(props): Element

Parameters

props

StatTilesProps

Returns

Element