mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-03 19:15:30 -05:00
abb59e4603
[web] Migrate the file tree on the editor page to Bootstrap 5 GitOrigin-RevId: e2efec26242c8cdab37a54bc182b83bfb0f1eb3c
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
import { useTranslation } from 'react-i18next'
|
|
import { useFileTreeActionable } from '../../contexts/file-tree-actionable'
|
|
import FileTreeCreateFormProvider from '../../contexts/file-tree-create-form'
|
|
import FileTreeModalCreateFileBody from '../file-tree-create/file-tree-modal-create-file-body'
|
|
import FileTreeModalCreateFileFooter from '../file-tree-create/file-tree-modal-create-file-footer'
|
|
import OLModal, {
|
|
OLModalBody,
|
|
OLModalFooter,
|
|
OLModalHeader,
|
|
OLModalTitle,
|
|
} from '@/features/ui/components/ol/ol-modal'
|
|
|
|
export default function FileTreeModalCreateFile() {
|
|
const { t } = useTranslation()
|
|
|
|
const { isCreatingFile, cancel } = useFileTreeActionable()
|
|
|
|
if (!isCreatingFile) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<FileTreeCreateFormProvider>
|
|
<OLModal size="lg" onHide={cancel} show>
|
|
<OLModalHeader closeButton>
|
|
<OLModalTitle>{t('add_files')}</OLModalTitle>
|
|
</OLModalHeader>
|
|
|
|
<OLModalBody className="modal-new-file">
|
|
<FileTreeModalCreateFileBody />
|
|
</OLModalBody>
|
|
|
|
<OLModalFooter>
|
|
<FileTreeModalCreateFileFooter />
|
|
</OLModalFooter>
|
|
</OLModal>
|
|
</FileTreeCreateFormProvider>
|
|
)
|
|
}
|