This repository was archived by the owner on Jul 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdefault.tsx
More file actions
98 lines (95 loc) · 3.43 KB
/
default.tsx
File metadata and controls
98 lines (95 loc) · 3.43 KB
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
91
92
93
94
95
96
97
98
import * as ReactDOM from 'react-dom';
import * as React from 'react';
import { MenuComponent, MenuItemModel } from '@syncfusion/ej2-react-navigations';
import { SampleBase } from '../common/sample-base';
import './default.css';
/**
* Menu default sample
*/
export class Default extends SampleBase<{}, {}> {
//Menu items definition
public menuItems: MenuItemModel[] = [
{
text: 'File',
iconCss: 'em-icons e-file',
items: [
{ text: 'Open', iconCss: 'em-icons e-open' },
{ text: 'Save', iconCss: 'e-icons e-save' },
{ separator: true },
{ text: 'Exit' }
]
},
{
text: 'Edit',
iconCss: 'em-icons e-edit',
items: [
{ text: 'Cut', iconCss: 'em-icons e-cut' },
{ text: 'Copy', iconCss: 'em-icons e-copy' },
{ text: 'Paste', iconCss: 'em-icons e-paste' }
]
},
{
text: 'View',
items: [
{
text: 'Toolbars',
items: [
{ text: 'Menu Bar' },
{ text: 'Bookmarks Toolbar' },
{ text: 'Customize' },
]
},
{
text: 'Zoom',
items: [
{ text: 'Zoom In' },
{ text: 'Zoom Out' },
{ text: 'Reset' },
]
},
{ text: 'Full Screen' }
]
},
{
text: 'Tools',
items: [
{ text: 'Spelling & Grammar' },
{ text: 'Customize' },
{ separator: true },
{ text: 'Options' }
]
},
{
text: 'Help'
}
];
render() {
return (
<div className='control-pane'>
<div className='control-section'>
<div className='menu-section'>
<div className='menu-control'>
<MenuComponent items={this.menuItems}></MenuComponent>
</div>
</div>
</div>
<div id="action-description">
<p>This sample demonstrates default functionalities of the <code>menu</code> component. Interact with <code>menu</code> using hover / click action.</p>
</div>
<div id="description">
<p>
The menu component is a graphical user interface that serves as navigation header for your application or site. It provides a list of commands that can be carried out using the <code>items</code> property.
</p>
<p>
In this demo, the menu is rendered with default type of <b>Horizontal</b> orientation. Using <code>orientation</code> property, you can change the orientation to <b>Vertical</b>.
</p>
<p>
More information about menu can be found in this
<a target="_blank" href="http://ej2.syncfusion.com/react/documentation/menu/getting-started.html">
documentation</a> section.
</p>
</div>
</div>
)
}
}