-
Notifications
You must be signed in to change notification settings - Fork 43
/
SmartEdge.stories.tsx
44 lines (38 loc) · 942 Bytes
/
SmartEdge.stories.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import React from 'react'
import {
edgesBezier,
edgesStraight,
edgesStep,
edgesLabel,
nodes,
edgeTypes
} from './DummyData'
import { GraphWrapper } from './GraphWrapper'
import type { Meta, Story } from '@storybook/react'
import type { ReactFlowProps } from 'reactflow'
export default {
title: 'Smart Edge',
component: GraphWrapper
} as Meta
const Template: Story<ReactFlowProps> = (args) => <GraphWrapper {...args} />
export const SmartBezier = Template.bind({})
SmartBezier.args = {
edgeTypes,
defaultNodes: nodes,
defaultEdges: edgesBezier
}
export const SmartStraight = Template.bind({})
SmartStraight.args = {
...SmartBezier.args,
defaultEdges: edgesStraight
}
export const SmartStep = Template.bind({})
SmartStep.args = {
...SmartBezier.args,
defaultEdges: edgesStep
}
export const SmartBezierWithCustomLabel = Template.bind({})
SmartBezierWithCustomLabel.args = {
...SmartBezier.args,
defaultEdges: edgesLabel
}