Skip to content

Commit

Permalink
Clean up react-ts example and addon-essentials for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed May 18, 2020
1 parent acf5f25 commit 9346bae
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions examples/react-ts/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module.exports = {
stories: ['./src/*.stories.*'],
addons: ['@storybook/addon-essentials'],
typescript: {
check: true,
checkOptions: {},
docgen: 'react-docgen',
},
};
1 change: 1 addition & 0 deletions examples/react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 -c ./ --no-dll"
},
"dependencies": {
"@storybook/addon-essentials": "6.0.0-beta.7",
"@storybook/react": "6.0.0-beta.7",
"@types/react": "^16.9.35",
"@types/react-dom": "^16.9.8",
Expand Down
6 changes: 4 additions & 2 deletions examples/react-ts/src/button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { argsStory } from '@storybook/react';
import { Button } from './button';

export default { component: Button, title: 'Examples / Button' };
export default { component: Button, title: 'Examples/Button' };

export const SimpleButton = () => <Button label="Click me" />;
export const WithArgs = argsStory({ label: 'With args' });
export const Basic = () => <Button label="Click me" />;
3 changes: 3 additions & 0 deletions examples/react-ts/src/button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React, { FC, ButtonHTMLAttributes } from 'react';

export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
/**
* A label to show on the button
*/
label: string;
}

Expand Down

0 comments on commit 9346bae

Please sign in to comment.