-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.tsx
70 lines (67 loc) · 2.35 KB
/
example.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import React from 'react';
import ReactDOM from 'react-dom';
import {HashRouter as Router, Route, NavLink} from 'react-router-dom';
import DialogExample from './lib/dialog/dialog.example';
import ButtonExample from './lib/button.example';
import LayoutExample from './lib/layout/layout.example';
import {Layout, Aside, Header, Content, Footer} from './lib/layout/layout';
import './example.scss';
import IconDemo from './lib/icon/icon.demo';
import FormExample from './lib/form/form.example';
import ScrollExample from './lib/scroll/scroll.example';
import CitySelectExample from './lib/citySelect/citySelect.example';
import TreeExample from './lib/tree/tree.example';
const logo = require('./logo.png');
ReactDOM.render(
<Router>
<Layout className="site-page">
<Header className="site-header">
<div className="logo">
<img src={logo} width="48" height="48" alt=""/>
<span> FUI </span>
</div>
</Header>
<Layout>
<Aside className="site-aside">
<h2>组件</h2>
<ul>
<li>
<NavLink to="/icon">Icon</NavLink>
</li>
<li>
<NavLink to="/dialog">对话框</NavLink>
</li>
<li>
<NavLink to="/layout">布局</NavLink>
</li>
<li>
<NavLink to="/form">表单</NavLink>
</li>
<li>
<NavLink to="/scroll">滚动条</NavLink>
</li>
<li>
<NavLink to="/citySelect">城市选择</NavLink>
</li>
<li>
<NavLink to="/tree">树型组件</NavLink>
</li>
</ul>
</Aside>
<Content className="site-main">
<Route path="/icon" component={IconDemo}/>
<Route path="/button" component={ButtonExample}/>
<Route path="/dialog" component={DialogExample}/>
<Route path="/layout" component={LayoutExample}/>
<Route path="/form" component={FormExample}/>
<Route path="/scroll" component={ScrollExample}/>
<Route path="/citySelect" component={CitySelectExample}/>
<Route path="/tree" component={TreeExample}/>
</Content>
</Layout>
<Footer className="site-footer">
© 方应杭
</Footer>
</Layout>
</Router>
, document.querySelector('#root'));