Skip to content

Commit

Permalink
01- setup-storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
bahdcoder committed Jul 27, 2020
1 parent 615512d commit 687a2ce
Show file tree
Hide file tree
Showing 4 changed files with 3,655 additions and 161 deletions.
4 changes: 4 additions & 0 deletions packages/react/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
stories: ['../src/**/*.stories.tsx'],
addons: ['@storybook/preset-typescript']
}
7 changes: 6 additions & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
"@babel/preset-env": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@storybook/preset-typescript": "^3.0.0",
"@storybook/react": "^5.3.19",
"@testing-library/jest-dom": "^5.11.1",
"@testing-library/react": "^10.4.7",
"@types/jest": "^26.0.7",
"@types/react": "^16.9.43",
"babel-loader": "^8.1.0",
"jest": "^26.1.0",
"react": "^16.13.1",
"rollup": "^2.22.1",
Expand All @@ -21,6 +24,8 @@
"build": "rollup -c",
"dev": "yarn build --watch",
"test": "jest --verbose",
"test:watch": "yarn test --watch"
"test:watch": "yarn test --watch",
"start-storybook": "start-storybook",
"build-storybook": "build-storybook"
}
}
23 changes: 23 additions & 0 deletions packages/react/src/molecules/Select/Select.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react'
import Select from './Select'


// css
import '@ds.e/scss/lib/Select.css'

const options = [{
label: 'Strict Black',
value: 'black'
}, {
label: 'Heavenly Green',
value: 'green'
}, {
label: 'Sweet Pink',
value: 'pink'
}]

export default {
title: 'Select'
}

export const Common = () => <Select options={options} />
Loading

0 comments on commit 687a2ce

Please sign in to comment.