Skip to content

Commit

Permalink
📝 docs: 优化 Mindflow demo 文件结构
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Mar 18, 2021
1 parent 8b91d2e commit caa869e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
13 changes: 13 additions & 0 deletions docs/components/biz/examples/Mindflow/Demo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import Mindflow from '@arvinxu/mindflow';
import { demo } from './data';

const MindflowDemo = () => {
return (
<div>
<Mindflow data={demo} height={600} />
</div>
);
};

export default MindflowDemo;
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import Mindflow, { MindflowData } from '@arvinxu/mindflow';
import { MindflowData } from '@arvinxu/mindflow';

const data: MindflowData = {
export const demo: MindflowData = {
nodes: [
{
id: 'node1',
Expand Down Expand Up @@ -112,12 +111,3 @@ const data: MindflowData = {
},
],
};
const Basic = () => {
return (
<div>
<Mindflow data={data} height={600} />
</div>
);
};

export default Basic;
2 changes: 1 addition & 1 deletion docs/components/biz/mindflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ Mindflow 是基于 [溯因推理][reason] 与 [图尔敏推论模型][toulmin]
## 演示

PS: 暂不支持多实例
<code src='./examples/Mindflow/Basic.tsx' />
<code src='./examples/Mindflow/Demo.tsx' />

<API src='../../../packages/mindflow/src/index.tsx'></API>

0 comments on commit caa869e

Please sign in to comment.