refactor(storybook): remove
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
import '@storybook/addon-actions/register';
|
||||
import '@storybook/addon-links/register';
|
||||
@@ -1,9 +0,0 @@
|
||||
import { configure } from '@storybook/react';
|
||||
|
||||
// automatically import all files ending in *.stories.js
|
||||
const req = require.context('../stories', true, /\.stories\.js$/);
|
||||
function loadStories() {
|
||||
req.keys().forEach(filename => req(filename));
|
||||
}
|
||||
|
||||
configure(loadStories, module);
|
||||
5670
package-lock.json
generated
5670
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,10 +19,6 @@
|
||||
"@babel/core": "^7.5.4",
|
||||
"@babel/preset-env": "^7.5.4",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@storybook/addon-actions": "^5.1.10",
|
||||
"@storybook/addon-links": "^5.1.10",
|
||||
"@storybook/addons": "^5.1.10",
|
||||
"@storybook/react": "^5.1.10",
|
||||
"autoprefixer": "^9.6.1",
|
||||
"babel-loader": "^8.0.6",
|
||||
"babel-preset-react-app": "^9.0.0",
|
||||
@@ -46,9 +42,7 @@
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"watch": "rollup -w -c",
|
||||
"dev": "parcel example/index.html -d example/build",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"build-storybook": "build-storybook"
|
||||
"dev": "parcel example/index.html -d example/build"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
import { storiesOf } from '@storybook/react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import Graph from '../src';
|
||||
|
||||
const initialElements = [
|
||||
{ id: '1', type: 'input', data: { label: '1 Tests' }, position: { x: 250, y: 5 } },
|
||||
{ id: '2', data: { label: '2 This is a node This is a node This is a node This is a node' }, position: { x: 100, y: 100 } },
|
||||
{ id: '3', data: { label: '3 I bring my own style' }, position: { x: 100, y: 200 }, style: { background: '#eee', color: '#222', border: '1px solid #bbb' } },
|
||||
{ id: '4', type: 'output', data: { label: '4 nody nodes' }, position: { x: 50, y: 300 } },
|
||||
{ id: '5', type: 'default', data: { label: '5 Another node'}, position: { x: 400, y: 300 } },
|
||||
{ id: '6', type: 'output', data: { label: '7 output' }, position: { x: 250, y: 500 } },
|
||||
{ source: '1', target: '2', animated: true },
|
||||
{ source: '2', target: '3' },
|
||||
{ source: '3', target: '4' },
|
||||
{ source: '3', target: '5' },
|
||||
{ source: '5', target: '6', type: 'straight', animated: true, style: { stroke: '#FFCC00' } },
|
||||
];
|
||||
|
||||
storiesOf('Flow Renderer', module)
|
||||
.add('standard', () => (
|
||||
<Graph
|
||||
elements={initialElements}
|
||||
onElementClick={elm => action('element click')(elm)}
|
||||
onElementsRemove={elms => action('element remove')(elms)}
|
||||
onConnect={params => action('connect')(params)}
|
||||
onNodeDragStop={node => action('drag stop')(node)}
|
||||
style={{ width: 600, height: 400, border: '1px solid #eee' }}
|
||||
onLoad={flow => action('flow loaded')(flow)}
|
||||
/>)
|
||||
)
|
||||
.add('with some emoji', () => (
|
||||
<div onClick={action('clicked')}>
|
||||
<span role="img" aria-label="so cool">
|
||||
😀 😎 👍 💯
|
||||
</span>
|
||||
</div>
|
||||
));
|
||||
Reference in New Issue
Block a user