mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
b85ae6e58e
* Migrate actions menu in editor left menu to react * Move margin from inline style to css file * remove focus selector to avoid "highlighting" the button after closing modal and regain focus * Add disabled state on word count button when the compiling is loading or failed * Use div instead of button for disabled word count button * Add accessibility text props when LeftMenuButton is disabled * Add actions menu test cases and storybook components * use util assign function and wrap function prop in usecallback GitOrigin-RevId: 81ab104be21fbcf5dfbc72c07d29eeb32976c61f
27 lines
648 B
TypeScript
27 lines
648 B
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import getMeta from '../../../utils/meta'
|
|
import ActionsCopyProject from './actions-copy-project'
|
|
import ActionsWordCount from './actions-word-count'
|
|
|
|
export default function ActionsMenu() {
|
|
const { t } = useTranslation()
|
|
const anonymous = getMeta('ol-anonymous') as boolean | undefined
|
|
|
|
if (anonymous === true || anonymous === undefined) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<h4>{t('actions')}</h4>
|
|
<ul className="list-unstyled nav">
|
|
<li>
|
|
<ActionsCopyProject />
|
|
</li>
|
|
<li>
|
|
<ActionsWordCount />
|
|
</li>
|
|
</ul>
|
|
</>
|
|
)
|
|
}
|