-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.tsx
54 lines (52 loc) · 1.75 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
import React from 'react'
import ReactDOM from 'react-dom'
import { HashRouter as Router, Route, NavLink } from 'react-router-dom'
import ButtonExample from './lib/button/button.example'
import DialogExample from './lib/dialog/dialog.example'
import LayoutExample from './lib/layout/layout.example'
import FormExample from './lib/form/form.example'
import { Layout, Aside, Content, Header, Footer } from './lib/layout/layout';
import IconDemo from './lib/icon/icon.demo'
import './example.scss'
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="logo" />
<span>FUI</span>
</div>
</Header>
<Layout>
<Aside className="site-aside">
<h2>组件</h2>
<ul>
<li>
<NavLink to="/icon">Icon</NavLink>
</li>
<li>
<NavLink to="/dialog">Dialog对话框</NavLink>
</li>
<li>
<NavLink to="/layout">Layout</NavLink>
</li>
<li>
<NavLink to="/form">Form</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} />
</Content>
</Layout>
<Footer className="site-footer">
© made in 2019-06-05
</Footer>
</Layout>
</Router>
), document.getElementById('root'))