mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
ff62a7e63c
GitOrigin-RevId: 923bf41a8c5e9f0932a1711530446dfd5c8d0d7f
33 lines
1.1 KiB
JavaScript
33 lines
1.1 KiB
JavaScript
import React from 'react'
|
|
import { Modal } from 'react-bootstrap'
|
|
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 AccessibleModal from '../../../../shared/components/accessible-modal'
|
|
|
|
export default function FileTreeModalCreateFile() {
|
|
const { isCreatingFile, cancel } = useFileTreeActionable()
|
|
|
|
if (!isCreatingFile) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<FileTreeCreateFormProvider>
|
|
<AccessibleModal bsSize="large" onHide={cancel} show>
|
|
<Modal.Header closeButton>
|
|
<Modal.Title>Add Files</Modal.Title>
|
|
</Modal.Header>
|
|
|
|
<Modal.Body className="modal-new-file">
|
|
<FileTreeModalCreateFileBody />
|
|
</Modal.Body>
|
|
|
|
<Modal.Footer>
|
|
<FileTreeModalCreateFileFooter />
|
|
</Modal.Footer>
|
|
</AccessibleModal>
|
|
</FileTreeCreateFormProvider>
|
|
)
|
|
}
|