diff --git a/packages/react/.storybook/main.js b/packages/react/.storybook/main.js new file mode 100644 index 0000000..419fdaa --- /dev/null +++ b/packages/react/.storybook/main.js @@ -0,0 +1,4 @@ +module.exports = { + stories: ['../src/**/*.stories.tsx'], + addons: ['@storybook/preset-typescript'] +} diff --git a/packages/react/package.json b/packages/react/package.json index 38dd06b..5c4e543 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -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", @@ -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" } } diff --git a/packages/react/src/molecules/Select/Select.stories.tsx b/packages/react/src/molecules/Select/Select.stories.tsx new file mode 100644 index 0000000..2549a21 --- /dev/null +++ b/packages/react/src/molecules/Select/Select.stories.tsx @@ -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 = () =>