aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/NavigationIcon.js
blob: 9594d61f306ca30be7e5b9b075b3268bb02bed5d (plain) (blame)
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
import React from 'react';
import PropTypes from 'prop-types';

import Icon from './Icon';

import './NavigationIcon.css';

/**
 * @typedef {Object} NavigationIconProps
 * @property {(event: React.MouseEvent) => void} onToggle
 */

 /**
  * Navigation icon
  * @param {NavigationIconProps} props
  */
function NavigationIcon(props) {
    return (
        <div id="navicon" className="mobile" onClick={props.onToggle}>
            <Icon name="ei-navicon" size="s"/>
        </div>
    );
}

export default React.memo(NavigationIcon);

NavigationIcon.propTypes = {
    onToggle: PropTypes.func.isRequired
};