-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.tsx
46 lines (43 loc) · 1.22 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
import React from 'react';
import ReactDOM from 'react-dom';
import {HashRouter as Router, Route, Link} from 'react-router-dom';
import IconExample from './lib/icon/icon.example';
import DialogExample from './lib/dialog/dialog.example';
import ButtonExample from './lib/button.example';
import LayoutExample from './lib/layout/layout.example';
ReactDOM.render(
<Router>
<div>
<header>
<div className="logo">
FUI
</div>
</header>
<div>
<aside>
<h2>组件</h2>
<ul>
<li>
<Link to="/icon">Icon</Link>
</li>
<li>
<Link to="/button">Button</Link>
</li>
<li>
<Link to="/dialog">对话框</Link>
</li>
<li>
<Link to="/layout">布局</Link>
</li>
</ul>
</aside>
<main>
<Route path="/icon" component={IconExample}/>
<Route path="/button" component={ButtonExample}/>
<Route path="/dialog" component={DialogExample}/>
<Route path="/layout" component={LayoutExample}/>
</main>
</div>
</div>
</Router>
, document.querySelector('#root'));