Skip to content

@serenity-is/sleekgrid / PercentCompleteFormatter

Function: PercentCompleteFormatter()

PercentCompleteFormatter(ctx): FormatterResult

Defined in: src/formatters/formatters.ts:9

Renders a numeric percent value as bold colored text (red < 50%, green otherwise). Returns "-" when the value is empty/null.

Parameters

ctx

FormatterContext

Formatter context whose value is the numeric percentage (0–100).

Returns

FormatterResult

A <span> element with colored text, or "-" for empty values.