mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-03 02:54:42 -05:00
37d45d64b3
* Created ng-controller for react shared context and set editor.loading * toolbar-header component with menu button (and story) * Added editor-navigation-toolbar-root and react2angular plumbing * Added eslint-disable exception to use <a/> instead of <button/> * added 'menu' to extracted translation * [ReactNavToolbar] Added cobranding and back to projects buttons (#3515) GitOrigin-RevId: 27c3bba85cbc96a123d58c66a0bd5d6a2cfd8aca
22 lines
616 B
JavaScript
22 lines
616 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import { useTranslation } from 'react-i18next'
|
|
import Icon from '../../../shared/components/icon'
|
|
|
|
function MenuButton({ onClick }) {
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
<a role="button" className="btn btn-full-height" href="#" onClick={onClick}>
|
|
<Icon type="fw" modifier="bars" classes={{ icon: 'editor-menu-icon' }} />
|
|
<p className="toolbar-label">{t('menu')}</p>
|
|
</a>
|
|
)
|
|
}
|
|
|
|
MenuButton.propTypes = {
|
|
onClick: PropTypes.func.isRequired
|
|
}
|
|
|
|
export default MenuButton
|