Fix crashing on droping text (#302)

* Add basic drop overlay

* Prevent crash when dragging text

* Only show popup when files are being dragged

* Make drop box bigger

* Make drag drop overlay without a modal

* Don't show drag drop menu on top of modals

* Use different way to check for modal
This commit is contained in:
ginnyTheCat 2022-02-09 03:59:21 +01:00 committed by GitHub
parent 4803d48ec7
commit 6d9e67b9f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 7 deletions

View file

@ -0,0 +1,24 @@
import React from 'react';
import PropTypes from 'prop-types';
import './DragDrop.scss';
import RawModal from '../../atoms/modal/RawModal';
import Text from '../../atoms/text/Text';
function DragDrop({ isOpen }) {
return (
<RawModal
className="drag-drop__model"
overlayClassName="drag-drop__overlay"
isOpen={isOpen}
>
<Text variant="h2" weight="medium">Drop file to upload</Text>
</RawModal>
);
}
DragDrop.propTypes = {
isOpen: PropTypes.bool.isRequired,
};
export default DragDrop;