From 60148dc1ba33280ef0a3bc3e3bc6701838288bb5 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Thu, 28 Mar 2019 23:34:45 +0900 Subject: [PATCH] Fixed the scenario structure for Storybook --- src/stories/Dummy.stories.tsx | 7 ++++--- src/stories/index.stories.tsx | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/stories/Dummy.stories.tsx b/src/stories/Dummy.stories.tsx index f3fb09d..7f07feb 100644 --- a/src/stories/Dummy.stories.tsx +++ b/src/stories/Dummy.stories.tsx @@ -2,6 +2,7 @@ import { storiesOf } from '@storybook/react'; import React from 'react'; import Dummy from '~/app/Dummy'; -export default storiesOf('Dummy', module) - .add('with text', () => Hello, World!) - .add('with some emoji', () => 😀 😎 👍 💯); +export default () => + storiesOf('Dummy', module) + .add('with text', () => Hello, World!) + .add('with some emoji', () => 😀 😎 👍 💯); diff --git a/src/stories/index.stories.tsx b/src/stories/index.stories.tsx index f5fc0ec..6ce8792 100644 --- a/src/stories/index.stories.tsx +++ b/src/stories/index.stories.tsx @@ -11,9 +11,10 @@ export const interactions: IInteraction[] = [ } ]; -export default storiesOf('Welcome', module).add('to Storybook', () => ( -
{text('title', 'Hello')}
-)); +export default () => + storiesOf('Welcome', module).add('to Storybook', () => ( +
{text('title', 'Hello')}
+ )); // import { Button, Welcome } from '@storybook/react/demo'; // import { action } from '@storybook/addon-actions';