A short message beside content: information, or something that went wrong.
Invoices sync every hourChanges in Northwind Freight's ledger show here within the hour.
Couldn't reach the ledgerThe API key was revoked. Paste a new one in Settings, then sync again.
import type { Html } from "@effect/ui/html"import * as stylex from "@stylexjs/stylex"import { Callout } from "./ui/uicontext/components/Callout.ts"import { sx } from "./ui/uicontext/components/Sx.ts"const styles = stylex.create({ stack: { display: "grid", gap: 12, inlineSize: "min(100%, 30rem)" } })// info is read as a note; error is announced at onceexport const ConnectionNotes = <M>(h: Html.H<M>) => h.div.attrs(sx(styles.stack)).children( Callout(h, "info", [ h.strong.children("Invoices sync every hour"), h.span.children("Changes in Northwind Freight's ledger show here within the hour."), ]), Callout(h, "error", [ h.strong.children("Couldn't reach the ledger"), h.span.children("The API key was revoked. Paste a new one in Settings, then sync again."), ]), )Installation
pnpm dlx shadcn@latest add checkfu/uicontext/calloutUsage
import { Callout } from "./ui/uicontext/components/Callout.ts"export const ScheduleNote = <M>(h: Html.H<M>) => Callout(h, "info", [h.strong.children("Runs every weekday"), h.span.children("It starts at 9:00 in the workspace's time zone.")])Accessibility
- An error callout is an
alert, announced when it appears; any other callout is anote. - The words must carry the meaning; the tone only colors it.