Skip to content

Commit

Permalink
Standalone CSF example (#9223)
Browse files Browse the repository at this point in the history
Standalone CSF example
  • Loading branch information
shilman authored Dec 24, 2019
2 parents ca22a87 + 6c97588 commit 46e970c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
7 changes: 7 additions & 0 deletions examples/standalone-preview/stories/Component1.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as React from 'react';

export default {
title: 'Component 1',
};

export const Story1 = () => <div>Component 1 - Story 1</div>;
8 changes: 8 additions & 0 deletions examples/standalone-preview/stories/Component2.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as React from 'react';

export default {
title: 'Component 2',
};

export const Story1 = () => <div>Component 2 - Story 1</div>;
export const Story2 = () => <div>Component 2 - Story 2</div>;
2 changes: 1 addition & 1 deletion examples/standalone-preview/storybook.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body>
<div id="root"></div>
<script src="./storybook.tsx"></script>
<script src="./storybook.ts"></script>
<div class="sb-errordisplay sb-wrapper">
<div id="error-message" class="sb-heading"></div>
<pre class="sb-errordisplay_code"><code id="error-stack"></code></pre>
Expand Down
5 changes: 5 additions & 0 deletions examples/standalone-preview/storybook.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { configure } from '@storybook/react';
import * as Comp1 from './stories/Component1.stories';
import * as Comp2 from './stories/Component2.stories';

configure(() => [Comp1, Comp2], module);
10 changes: 0 additions & 10 deletions examples/standalone-preview/storybook.tsx

This file was deleted.

1 comment on commit 46e970c

@vercel
Copy link

@vercel vercel bot commented on 46e970c Dec 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.