// Copyright 2021 99cloud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import React from 'react'; import { observer } from 'mobx-react'; import { CloseOutlined } from '@ant-design/icons'; import PropTypes from 'prop-types'; import { Drawer } from 'antd'; import menuIcon from 'asset/image/global-menu.png'; import { navItemPropType } from './common'; import Left from './Left'; import Right from './Right'; import styles from './index.less'; export class GlobalNav extends React.Component { static propTypes = { navItems: PropTypes.oneOfType([ PropTypes.arrayOf(navItemPropType), PropTypes.array, ]), }; static defaultProps = { navItems: [], }; constructor(props) { super(props); this.state = { visible: false, }; } onClose = () => { this.setState({ visible: false }); }; onToggleOpen = () => { this.setState(({ visible }) => { return { visible: !visible, }; }); }; render() { const { visible } = this.state; const { navItems = [] } = this.props; const drawerStyle = { top: '40px', height: 'calc(100% - 40px)', }; return ( <>
menu-icon
} >
); } } export default observer(GlobalNav);