mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 15:55:09 -05:00
306b2b7727
Replacing `btn-info` with `btn-secondary-info btn-secondary` in the editor GitOrigin-RevId: 1e348b0b09bfd08508a3dbee7df882f41fdc16eb
33 lines
1,013 B
JavaScript
33 lines
1,013 B
JavaScript
import { Dropdown } from 'react-bootstrap'
|
|
import PdfFileList from './pdf-file-list'
|
|
import ControlledDropdown from '../../../shared/components/controlled-dropdown'
|
|
import { memo } from 'react'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
|
|
|
|
function PdfDownloadFilesButton() {
|
|
const { compiling, fileList } = useCompileContext()
|
|
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<ControlledDropdown
|
|
id="dropdown-files-logs-pane"
|
|
dropup
|
|
pullRight
|
|
disabled={compiling || !fileList}
|
|
>
|
|
<Dropdown.Toggle
|
|
className="dropdown-toggle btn-secondary-info btn-secondary"
|
|
title={t('other_logs_and_files')}
|
|
bsSize="small"
|
|
bsStyle={null}
|
|
/>
|
|
<Dropdown.Menu id="dropdown-files-logs-pane-list">
|
|
<PdfFileList fileList={fileList} />
|
|
</Dropdown.Menu>
|
|
</ControlledDropdown>
|
|
)
|
|
}
|
|
|
|
export default memo(PdfDownloadFilesButton)
|