Skip to content

Commit

Permalink
Merge pull request #3 from rangle/ds-seed-initial-setup
Browse files Browse the repository at this point in the history
Adding Storybook to ds-seed
  • Loading branch information
turquoisemelon authored Jan 22, 2020
2 parents 7801c9a + 14c46e2 commit bcd22de
Show file tree
Hide file tree
Showing 7 changed files with 2,229 additions and 4,988 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ yarn-debug.log*
yarn-error.log*

# IDE files
.idea/
.idea/
1 change: 1 addition & 0 deletions packages/ds-seed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
4 changes: 4 additions & 0 deletions packages/ds-seed/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
stories: ['../src/components/**/*.stories.js'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
};
19 changes: 18 additions & 1 deletion packages/ds-seed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,22 @@
"version": "1.0.0",
"description": "Rangle Design System Seed Project",
"main": "index.js",
"license": "MIT"
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.8.3",
"@storybook/addon-actions": "^5.3.8",
"@storybook/addon-links": "^5.3.8",
"@storybook/addons": "^5.3.8",
"@storybook/react": "^5.3.8",
"babel-loader": "^8.0.6"
},
"scripts": {
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"peerDependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0"
}
}
Empty file.
18 changes: 18 additions & 0 deletions packages/ds-seed/src/components/button.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import { action } from '@storybook/addon-actions';
import { Button } from '@storybook/react/demo';

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

export const Text = () => <Button onClick={action('clicked')}>Hello Button</Button>;

export const Emoji = () => (
<Button onClick={action('clicked')}>
<span role="img" aria-label="so cool">
😀 😎 👍 💯
</span>
</Button>
);
7,173 changes: 2,187 additions & 4,986 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit bcd22de

Please sign in to comment.