import { NAME, pattern, UI, type VNode, Writable } from "commonfabric"; import { Controls, SelectControl, SwitchControl, TextControl, } from "../ui/controls/index.ts"; type TextVariant = | "caption" | "body-compact" | "body" | "body-large" | "heading-sm" | "heading-md" | "heading-lg"; type TextTone = | "default" | "muted" | "tertiary" | "disabled" | "primary" | "success" | "warning" | "error"; // deno-lint-ignore no-empty-interface interface TextStoryInput {} export interface TextStoryOutput { [NAME]: string; [UI]: VNode; controls: VNode; } export default pattern(() => { const variant = new Writable("body"); const tone = new Writable("default"); const block = new Writable(true); const truncate = new Writable(false); const content = new Writable("Text content"); return { [NAME]: "cf-text Story", [UI]: (
Caption / metadata Compact body text for dense lists and small controls. Body text for default descriptions, helper copy, and explanatory text. Large body text for more prominent supporting copy. Small heading-style text Medium heading-style text Large heading-style text Truncated text clips to a single line with an ellipsis, even inside a flex row like cf-hstack. tag {content} Use cf-label only when text labels a specific control.
), controls: ( <> ), }; });