Skip to content

components/Checklist

import { … } from 'zidane-ui'ui/src/components/Checklist.tsx

Components#

ChecklistComponent#

Renders the groups as one grid of checks, or as cards.

TypeScript
function Checklist(props: ChecklistProps): Element
Parameters
NameTypeDescription
propsChecklistProps

ChecklistProps.

Element
Checklist props
NameTypeDefaultDescription
className?string

Extra classes on the root element.

groupLabel?string

The header over the group names in the grid, such as "Package".

groupsreadonly ChecklistGroup[]

The groups, in order.

style?CSSProperties

Inline styles on the root element.

summary?booleantrue

The count done, drawn large under the title. Off when a Progress above already says it.

title?ReactNode

A title above the checks.

ui/src/components/Checklist.tsx:109

Functions#

checklistIsGridFunction#

Whether every group has the same check labels in the same order, so the checks draw as one grid.

TypeScript
function checklistIsGrid(groups: readonly ChecklistGroup[]): boolean
Parameters
NameTypeDescription
groupsreadonly ChecklistGroup[]

The groups.

boolean

ui/src/components/Checklist.tsx:63

Interfaces#

ChecklistGroupInterface#

One group of checks: a package, a host, a step.

TypeScript
interface ChecklistGroup
ChecklistGroup properties
NameTypeDescription
itemsreadonly ChecklistItem[]

The group's checks, in order.

labelstring

The group's name.

ui/src/components/Checklist.tsx:25

ChecklistItemInterface#

One check of a ChecklistGroup.

TypeScript
interface ChecklistItem
ChecklistItem properties
NameTypeDescription
labelstring

What the check is.

note?string

A short line after the label.

statusChecklistStatus

How the check went.

ui/src/components/Checklist.tsx:15

ChecklistPropsInterface#

Props for Checklist.

TypeScript
interface ChecklistProps
ChecklistProps properties
NameTypeDefaultDescription
className?string

Extra classes on the root element.

groupLabel?string

The header over the group names in the grid, such as "Package".

groupsreadonly ChecklistGroup[]

The groups, in order.

style?CSSProperties

Inline styles on the root element.

summary?booleantrue

The count done, drawn large under the title. Off when a Progress above already says it.

title?ReactNode

A title above the checks.

ui/src/components/Checklist.tsx:33

Types#

ChecklistStatusType#

How one check went.

TypeScript
type ChecklistStatus = 'done' | 'failed' | 'pending'

ui/src/components/Checklist.tsx:12