generated from arvinxx/monorepo-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,10 @@ | ||
import React, { useState } from 'react'; | ||
import { Radio } from 'antd'; | ||
import { devtools } from 'stook-devtools'; | ||
import React from 'react'; | ||
|
||
import Mindflow from '@arvinxu/mindflow'; | ||
import * as datasource from './data'; | ||
|
||
// @ts-ignore | ||
if (process.env.NODE_ENV !== 'production') { | ||
devtools.init(); | ||
} | ||
|
||
const { Group } = Radio; | ||
|
||
const MindflowDemo = () => { | ||
const [type, setType] = useState<'demo' | 'museum' | 'thinking'>('thinking'); | ||
|
||
return ( | ||
<div> | ||
<div style={{ marginBottom: 16 }}> | ||
<span style={{ marginRight: 8 }}>切换案例数据:</span> | ||
<Group | ||
value={type} | ||
onChange={(e) => { | ||
setType(e.target.value); | ||
}} | ||
> | ||
<Radio value={'demo'}>demo</Radio> | ||
<Radio value={'museum'}>博物馆案例</Radio> | ||
<Radio value={'thinking'}>思考案例</Radio> | ||
</Group> | ||
</div> | ||
<Mindflow data={datasource[type]} height={600} /> | ||
</div> | ||
); | ||
return <Mindflow value={datasource.demo} height={600} />; | ||
}; | ||
|
||
export default MindflowDemo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
import Mindflow from '@arvinxu/mindflow'; | ||
import * as datasource from './data'; | ||
|
||
const Museum = () => { | ||
return <Mindflow value={datasource.museum} height={600} />; | ||
}; | ||
|
||
export default Museum; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import Mindflow from '@arvinxu/mindflow'; | ||
|
||
import * as datasource from './data'; | ||
|
||
const Thinking = () => { | ||
return <Mindflow value={datasource.thinking} height={600} />; | ||
}; | ||
|
||
export default Thinking; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters