)
}
export function BadgeCountOnlyPreview() {
return (
selected
)
}
export function StatusBadgeSemanticPreview() {
return (
{/* Default table density (`sm`) with icons — same as StatusCell columns. */}
{SEMANTIC_STATUS_EXAMPLES.map((item) => (
))}
{SEMANTIC_STATUS_EXAMPLES.map((item) => (
))}
)
}
/**
* The editable counterpart to `StatusBadgeSemanticPreview`. Lives on the badge
* page because that is where people come looking for a status chip, but the
* primitive is `StatusCell` — a badge alone is never interactive.
*/
export function StatusBadgeActionablePreview() {
const [status, setStatus] = React.useState("in-review")
const options: StatusCellOption[] = SEMANTIC_STATUS_EXAMPLES.map((item) => ({
value: item.label.toLowerCase().replace(/\s+/g, "-"),
label: item.label,
tone: item.tone,
icon: item.icon,
}))
const current = options.find((o) => o.value === status) ?? options[0]
return (
Read-only
Editable
The chevron appears only when both options and{" "}
onChange are passed, so a user who cannot change status never
sees an affordance that does nothing.
)
}
export function StatusBadgeProductPreview() {
return (
)
}
export function SkeletonTextPreview() {
return (
)
}
export function SkeletonListRowPreview() {
return (
)
}
export function SkeletonTableRowPreview() {
return (
)
}
export function SkeletonFormPreview() {
return (
)
}
/** @deprecated Use SkeletonListRowPreview */
export const SkeletonCardPreview = SkeletonListRowPreview
export function KbdTilePreview() {
return (
/* Not a
: KbdGroup is a div, which a paragraph cannot legally contain. */
Open search
⌘K
)
}
/** @deprecated Use KbdTilePreview */
export const KbdPreview = KbdTilePreview
export function KbdBareInButtonPreview() {
return (
)
}
export function KbdGroupPreview() {
return (
⌘⇧P
)
}
export function KbdSymbolsPreview() {
return (