Skip to content

Commit bc84caf

Browse files
committed
Storybook and organize text stories
1 parent 6bb47e0 commit bc84caf

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

site/src/components/CodeBlock/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Started container user
99
Using user 'coder' with shell '/bin/bash'`.split("\n")
1010

1111
export default {
12-
title: "CodeBlock/CodeBlock",
12+
title: "Text/CodeBlock",
1313
component: CodeBlock,
1414
argTypes: {
1515
lines: { control: "text", defaultValue: sampleLines },

site/src/components/CodeExample/CodeExample.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { CodeExample, CodeExampleProps } from "./CodeExample"
55
const sampleCode = `echo "Hello, world"`
66

77
export default {
8-
title: "CodeBlock/CodeExample",
8+
title: "Text/CodeExample",
99
component: CodeExample,
1010
argTypes: {
1111
code: { control: "string", defaultValue: sampleCode },
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { Story } from "@storybook/react"
2+
import React from "react"
3+
import { Typography, TypographyProps } from "."
4+
5+
export default {
6+
title: "Text/Typography",
7+
component: Typography,
8+
}
9+
10+
const Template: Story<TypographyProps> = (args: TypographyProps) => (
11+
<>
12+
<Typography {...args}>
13+
Colorless green ideas sleep furiously
14+
</Typography>
15+
<Typography {...args}>
16+
More people have been to France than I have
17+
</Typography>
18+
</>
19+
)
20+
21+
export const Short = Template.bind({})
22+
Short.args = {
23+
short: true
24+
}
25+
export const Tall = Template.bind({})
26+
Tall.args = {
27+
short: false
28+
}

0 commit comments

Comments
 (0)