blob: 1362bb8976b06d294064f52b2725c50ca0608389 (
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
34
35
|
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) {
window.requestMessages().done(() => {
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);
}
}
};
|