-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathapp.tsx
More file actions
59 lines (53 loc) · 2.07 KB
/
app.tsx
File metadata and controls
59 lines (53 loc) · 2.07 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
import * as React from 'react';
import { createRoot } from 'react-dom/client';
import { SpreadsheetComponent } from '@syncfusion/ej2-react-spreadsheet';
import { TabComponent, TabItemsDirective, TabItemDirective } from '@syncfusion/ej2-react-navigations';
function App(): React.ReactElement {
const SpreadsheetTabContent: any = () => {
return (
<div className="spreadsheet-pane">
<div>
<SpreadsheetComponent height="100%" width="100%" />
</div>
</div>
);
};
return (
<div className="page">
<header className="header">
<h3 style={{ margin: 0 }}>Spreadsheet in tab</h3>
</header>
<div className="tab-host">
<TabComponent height="100%">
<TabItemsDirective>
<TabItemDirective
header={{ text: 'Overview' }}
content={() => (
<div className="panel">
<h4>Overview</h4>
<p>Put general dashboard content here.</p>
</div>
)}
/>
<TabItemDirective
header={{ text: 'Spreadsheet' }}
content={SpreadsheetTabContent}
/>
<TabItemDirective
header={{ text: 'Settings' }}
content={() => (
<div className="panel">
<h4>Settings</h4>
<p>Any settings or forms can go here.</p>
</div>
)}
/>
</TabItemsDirective>
</TabComponent>
</div>
</div>
);
};
export default App;
const root = createRoot(document.getElementById('root')!);
root.render(<App />);