-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.tsx
67 lines (63 loc) · 2.48 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
import React from 'react';
import ReactDOM from 'react-dom';
import {HashRouter as Router, NavLink, Route, Switch} from 'react-router-dom';
import {Content, Footer, Header, Layout, Sider} from './lib/components/layout/layout';
import style from './example.scss';
import logo from './logo.png';
import IconDemo from './lib/components/icon/iconExampleWithCode';
import DialogDemo from './lib/components/dialog/dialogExampleWithCode';
import LayoutDemo from './lib/components/layout/layoutExampleWithCode';
import FormDemo from './lib/components/form/formExampleWithCode';
import ScrollExample from './lib/components/scroll/example/scrollExampleWithCode';
import RadiosGroupExample from "./lib/components/radioGroup/example/radioGroupExampleWithCode";
import CheckboxGroupExample from "./lib/components/checkboxGroup/example/checkboxGroupExampleWithCode";
interface routerMatch {
[key: string]: any
}
const Home = () => (
<Layout className={style.sitePage}>
<Header className={style.siteHeader}>
<div className={style.logo}>
<a href="https://github.com/dudueasy/Apolo-UI">
<img src={logo} alt="" height={48}/>
<span> Apolo-UI </span>
</a>
</div>
</Header>
<Layout>
<Sider className={style.siteSider}>
<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>
<li><NavLink to="/scroll"> Scroll </NavLink></li>
<li><NavLink to="/radioGroup"> RadioGroup </NavLink></li>
<li><NavLink to="/checkboxGroup"> CheckboxGroup </NavLink></li>
</ul>
</Sider>
<Layout>
<Content className={style.siteMain}>
<Switch>
<Route path="/icon" component={IconDemo}/>
<Route path="/dialog" component={DialogDemo}/>
<Route path="/layout" component={LayoutDemo}/>
<Route path="/form" component={FormDemo}/>
<Route path="/scroll" component={ScrollExample}/>
<Route path="/radioGroup" component={RadiosGroupExample}/>
<Route path="/checkboxGroup" component={CheckboxGroupExample}/>
</Switch>
</Content>
</Layout>
</Layout>
<Footer className={style.siteFooter}>
© Apolo Du
</Footer>
</Layout>
);
ReactDOM.render(
<Router>
<Home/>
</Router>
, document.getElementById('app'));