forked from vkbansal/react-contextmenu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
59 lines (55 loc) · 2.12 KB
/
index.js
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
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, Link, IndexRoute, hashHistory } from 'react-router';
import SimpleMenu from './SimpleMenu';
import MultipleTargets from './MultipleTargets';
import MultipleMenus from './MultipleMenus';
import SubMenus from './SubMenus';
import Customization from './Customization';
import RTLSubMenu from './RTLSubMenu';
function App({ children }) {
return (
<div className='container-fluid'>
<h3>React ContextMenu <small>Context menus using react</small></h3>
<div className='col-xs-3'>
<ul className='nav nav-pills nav-stacked'>
<li>
<Link to='/simple-menu'>Simple Menu</Link>
</li>
<li>
<Link to='/multiple-targets'>Multiple Targets</Link>
</li>
<li>
<Link to='/multiple-menus'>Multiple Menus</Link>
</li>
<li>
<Link to='/submenus'>Sub Menus</Link>
</li>
<li>
<Link to='/customization'>Customization</Link>
</li>
<li>
<Link to='/rtl-submenus'>Right-to-Left</Link>
</li>
</ul>
</div>
<div className='col-xs-9' id='main'>
{children}
</div>
</div>
);
}
const Routes = (
<Router history={hashHistory}>
<Route path='/' component={App}>
<IndexRoute component={SimpleMenu}/>
<Route path='simple-menu' component={SimpleMenu}/>
<Route path='multiple-targets' component={MultipleTargets}/>
<Route path='multiple-menus' component={MultipleMenus}/>
<Route path='submenus' component={SubMenus}/>
<Route path='customization' component={Customization}/>
<Route path='rtl-submenus' component={RTLSubMenu}/>
</Route>
</Router>
);
ReactDOM.render(Routes, document.getElementById('main'));