Status

Status badges, tags and inline notices for runs and records.

QueuedRunningWaiting for approvalSucceededFailed

Invoice sync is paused. Resume

Runs every weekday at 9:00.

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/status

Usage

import { NoticeView, StatusBadge } from "./ui/uicontext/components/kit/Status.ts"
export const RunState = <M>(h: Html.H<M>) => StatusBadge(h, { tone: "info", label: "Running" })export const PausedNotice = <M>(h: Html.H<M>) =>	NoticeView(h, { tone: "warning", text: "This workflow is paused.", href: "/workflows/invoice-sync/settings", linkLabel: "Resume" })

API reference

StatusBadgeView function

Options

StatusBadge options
NameTypeDescription
tonerequired"neutral" | "accent" | "danger" | "warning" | "success" | "info"The dot's color, for what the status means.
labelrequiredstringThe status in a word or two.

ConfirmDialogView function

Options

ConfirmDialog options
NameTypeDefaultDescription
openrequiredboolean—Whether the dialog shows. The caller keeps it.
titlerequiredstring—The question, naming what goes: "Delete Website?".
descriptionrequiredstring—What happens, and whether it can be undone.
confirmLabelrequiredstring—The confirm button's text, a verb: "Delete project".
onCancelrequiredMessage—Sent on Escape and on Cancel.
onConfirmrequiredMessage—Sent by the confirm button.
confirmDisabledboolean—Keeps the confirm button disabled, as until a name is typed
bodyView.Children—More content between the description and the buttons, such as a field to type the name.
keystring"confirm"Names the confirmation among dialogs in the same view, "confirm" by default; its title may change

Accessibility

  • A status badge's dot is hidden from screen readers; its words carry the status.
  • A notice is a status, or an alert when it's a refusal, so it's announced when it appears. VisuallyHidden holds text for screen readers only.
  • The confirm dialog is a modal that names what goes; Escape and Cancel back out.

Source