aboutsummaryrefslogtreecommitdiff
path: root/app/features/navbar/components/Navbar.js
blob: f767436d72881fea91b40f34b7fb5655884e6ce5 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

// @flow

import Navigation, { AkGlobalItem } from '@atlaskit/navigation';

import React, { Component } from 'react';

import { isElectronMac } from '../../utils';

import HelpAction from './HelpAction';
import Logo from './Logo';

/**
 * Navigation Bar component.
 */
class Navbar extends Component<*> {
    /**
     * Get the primary icon of Global Navigation.
     *
     * @returns {ReactElement}
     */
    _getPrimaryIcon() {
        return <Logo />;
    }

    /**
     * Get the array of Secondary actions of Global Navigation.
     *
     * @returns {ReactElement[]}
     */
    _getSecondaryActions() {
        return [
            <AkGlobalItem key = { 0 }>
                <HelpAction />
            </AkGlobalItem>
        ];
    }

    /**
     * Render function of component.
     *
     * @returns {ReactElement}
     */
    render() {
        return (
            <Navigation
                globalPrimaryIcon = { this._getPrimaryIcon() }
                globalSecondaryActions = { this._getSecondaryActions() }
                isElectronMac = { isElectronMac() }
                isOpen = { false }
                isResizeable = { false } />
        );
    }
}

export default Navbar;