mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-11 09:40:28 +03:00
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:
parent
4803d48ec7
commit
6d9e67b9f2
4 changed files with 84 additions and 7 deletions
24
src/app/organisms/drag-drop/DragDrop.jsx
Normal file
24
src/app/organisms/drag-drop/DragDrop.jsx
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue