/
index.tsx
47 lines (44 loc) 路 1.36 KB
/
index.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
45
46
47
import React from 'react'
import NavLink from 'umi/navlink'
import styles from './index.less'
const features = [
{ link: '/helloworld', title: 'Hello World' },
{ link: '/markers', title: 'Markers' },
{ link: '/routers', title: 'Routers' },
{ link: '/ports', title: 'Ports' },
{ link: '/anchors', title: 'Anchors' },
{ link: '/layers', title: 'Layers' },
{ link: '/images', title: 'Images' },
{ link: '/indicators', title: 'Indicators' },
{ link: '/overlays', title: 'Overlays' },
{ link: '/labels', title: 'Labels' },
{ link: '/label-position', title: 'Label Position' },
{ link: '/page-breaks', title: 'Page Breaks' },
{ link: '/snapline', title: 'SnapLine' },
{ link: '/custom-render', title: 'Custom Render' },
{ link: '/infinite', title: 'Infinite Canvas' },
]
const BasicLayout: React.FC = props => {
return (
<div className={styles.wrap}>
<div className={styles.nav}>
<h2>Features</h2>
<ul>
{features.map(item => (
<li key={item.link}>
<NavLink to={item.link}>{item.title}</NavLink>
</li>
))}
</ul>
<h2>Charts</h2>
<ul>
<li>
<NavLink to="/flowchart">FlowChart</NavLink>
</li>
</ul>
</div>
<div className={styles.content}>{props.children}</div>
</div>
)
}
export default BasicLayout