-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23711 from storybookjs/writing-stories-in-typescript
- Loading branch information
Showing
37 changed files
with
379 additions
and
760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
docs/snippets/angular/table-story-fully-customize-controls.ts.mdx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
```ts | ||
// Button.stories.ts | ||
|
||
import type { Meta, StoryObj } from '@storybook/angular'; | ||
|
||
import { Button } from './button.component'; | ||
|
||
const meta: Meta<Button> = { | ||
component: Button, | ||
}; | ||
export default meta; | ||
|
||
type Story = StoryObj<Button>; | ||
|
||
export const Basic: Story = {}; | ||
|
||
export const Primary: Story = { | ||
args: { | ||
primary: true, | ||
}, | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
```ts | ||
// Button.stories.ts | ||
|
||
// Replace your-renderer with the renderer you are using (e.g., react, vue3, etc.) | ||
import type { Meta, StoryObj } from '@storybook/your-renderer'; | ||
|
||
import { Button } from './Button'; | ||
|
||
const meta = { | ||
component: Button, | ||
} satisfies Meta<typeof Button>; | ||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Basic = {} satisfies Story; | ||
|
||
export const Primary = { | ||
args: { | ||
primary: true, | ||
}, | ||
} satisfies Story; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
```ts | ||
// Button.stories.ts | ||
|
||
// Replace your-renderer with the renderer you are using (e.g., react, vue3, etc.) | ||
import type { Meta, StoryObj } from '@storybook/your-renderer'; | ||
|
||
import { Button } from './Button'; | ||
|
||
const meta: Meta<typeof Button> = { | ||
component: Button, | ||
}; | ||
export default meta; | ||
|
||
type Story = StoryObj<typeof Button>; | ||
|
||
export const Basic: Story = {}; | ||
|
||
export const Primary: Story = { | ||
args: { | ||
primary: true, | ||
}, | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
docs/snippets/react/table-story-fully-customize-controls.js.mdx
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
docs/snippets/react/table-story-fully-customize-controls.ts-4-9.mdx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.