blob: 04b0f1018fc792129ff3c2e474a23aab24f156c3 (
plain)
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
|
import React from 'react';
import GlobalNav from './global/global-nav';
import ComponentNav from './component/component-nav';
import SettingsNav from './settings/settings-nav';
export default {
start(options) {
this.renderGlobalNav(options);
options.space === 'component' && this.renderComponentNav(options);
options.space === 'settings' && this.renderSettingsNav(options);
},
renderGlobalNav(options) {
const el = document.getElementById('global-navigation');
if (el) {
React.render(<GlobalNav {...options}/>, el);
}
},
renderComponentNav(options) {
const el = document.getElementById('context-navigation');
if (el) {
React.render(<ComponentNav {...options}/>, el);
}
},
renderSettingsNav(options) {
const el = document.getElementById('context-navigation');
if (el) {
React.render(<SettingsNav {...options}/>, el);
}
}
};
|