File tree 1 file changed +14
-13
lines changed
site/src/components/Markdown 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change 1
- import { ComponentMeta , Story } from "@storybook/react" ;
2
- import { Markdown , MarkdownProps } from "./Markdown" ;
1
+ import type { Meta , StoryObj } from "@storybook/react" ;
2
+ import { Markdown } from "./Markdown" ;
3
3
4
- export default {
4
+ const meta : Meta < typeof Markdown > = {
5
5
title : "components/Markdown" ,
6
6
component : Markdown ,
7
- } as ComponentMeta < typeof Markdown > ;
7
+ } ;
8
8
9
- const Template : Story < MarkdownProps > = ( { children } ) => (
10
- < Markdown > { children } </ Markdown >
11
- ) ;
9
+ export default meta ;
10
+ type Story = StoryObj < typeof Markdown > ;
12
11
13
- export const WithCode = Template . bind ( { } ) ;
14
- WithCode . args = {
15
- children : `
12
+ export const WithCode : Story = {
13
+ args : {
14
+ children : `
16
15
## Required permissions / policy
17
16
18
17
The following sample policy allows Coder to create EC2 instances and modify instances provisioned by Coder:
@@ -64,12 +63,14 @@ WithCode.args = {
64
63
]
65
64
}
66
65
\`\`\`` ,
66
+ } ,
67
67
} ;
68
68
69
- export const WithTable = Template . bind ( { } ) ;
70
- WithTable . args = {
71
- children : `
69
+ export const WithTable : Story = {
70
+ args : {
71
+ children : `
72
72
| heading | b | c | d |
73
73
| - | :- | -: | :-: |
74
74
| cell 1 | cell 2 | 3 | 4 | ` ,
75
+ } ,
75
76
} ;
You can’t perform that action at this time.
0 commit comments