forked from vkbansal/react-contextmenu
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
90 lines (85 loc) · 3.36 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import React from 'react';
import ReactDOMClient from 'react-dom/client';
import { HashRouter as Router, Route, NavLink, Routes } from 'react-router-dom';
import SimpleMenu from './SimpleMenu';
import MultipleTargets from './MultipleTargets';
import MultipleMenus from './MultipleMenus';
import SubMenus from './SubMenus';
import DynamicMenu from './DynamicMenu';
import Customization from './Customization';
import RTLSubMenu from './RTLSubMenu';
import Nested from './Nested';
import './react-contextmenu.css';
const commonProps = {
className: 'pure-menu-link'
};
function App() {
return (
<div>
<div className='pure-menu pure-menu-horizontal'>
<ul className='pure-menu-list'>
<li className='pure-menu-item'>
<NavLink {...commonProps} to='/simple-menu'>
Simple Menu
</NavLink>
</li>
<li className='pure-menu-item'>
<NavLink {...commonProps} to='/multiple-targets'>
Multiple Targets
</NavLink>
</li>
<li className='pure-menu-item'>
<NavLink {...commonProps} to='/multiple-menus'>
Multiple Menus
</NavLink>
</li>
<li className='pure-menu-item'>
<NavLink {...commonProps} to='/submenus'>
Sub Menus
</NavLink>
</li>
<li className='pure-menu-item'>
<NavLink {...commonProps} to='/dynamic-menu'>
Dynamic Menu
</NavLink>
</li>
<li className='pure-menu-item'>
<NavLink {...commonProps} to='/customization'>
Customization
</NavLink>
</li>
<li className='pure-menu-item'>
<NavLink {...commonProps} to='/rtl-submenus'>
Right-to-Left
</NavLink>
</li>
<li className='pure-menu-item'>
<NavLink {...commonProps} to='/nested'>
Nested
</NavLink>
</li>
</ul>
</div>
<Routes>
<Route path='/simple-menu' element={<SimpleMenu />} />
<Route path='/multiple-targets' element={<MultipleTargets />} />
<Route path='/multiple-menus' element={<MultipleMenus />} />
<Route path='/submenus' element={<SubMenus />} />
<Route path='/dynamic-menu' element={<DynamicMenu />} />
<Route path='/customization' element={<Customization />} />
<Route path='/rtl-submenus' element={<RTLSubMenu />} />
<Route path='/nested' element={<Nested />} />
</Routes>
</div>
);
}
const root = ReactDOMClient.createRoot(document.getElementById('main'));
root.render(
<Router
future={{
v7_relativeSplatPath: true,
v7_startTransition: true
}}>
<App />
</Router>
);