chore: storybook (#15285)

Co-authored-by: David Hill <iamdavidhill@gmail.com>
This commit is contained in:
Adam
2026-02-26 16:05:04 -06:00
committed by GitHub
co-authored by David Hill
parent 8c484a05b8
commit 05d77b7d47
85 changed files with 5407 additions and 9 deletions
+51
View File
@@ -0,0 +1,51 @@
export const diff = {
before: {
name: "src/greet.ts",
contents: `export function greet(name: string) {
return \`Hello, \${name}!\`
}
`,
},
after: {
name: "src/greet.ts",
contents: `export function greet(name: string, excited = false) {
const message = \`Hello, \${name}!\`
return excited ? \`\${message}!!\` : message
}
`,
},
}
export const code = {
name: "src/calc.ts",
contents: `export function sum(values: number[]) {
return values.reduce((total, value) => total + value, 0)
}
export function average(values: number[]) {
if (values.length === 0) return 0
return sum(values) / values.length
}
`,
}
export const markdown = [
"# Markdown",
"",
"Use **Markdown** for rich text.",
"",
"## Highlights",
"- Headings, lists, and code blocks",
"- Inline `code` and links",
"",
"```ts",
"export const value = 42",
"```",
"",
"More at https://example.com/docs",
].join("\n")
export const changes = {
additions: 18,
deletions: 6,
}