2022-05-01 18:00:38 +02:00
|
|
|
import * as React from 'react';
|
2022-08-22 10:38:03 +02:00
|
|
|
import { MdDragIndicator } from 'react-icons/md';
|
2022-05-01 18:00:38 +02:00
|
|
|
|
2022-08-22 10:38:03 +02:00
|
|
|
interface Props {
|
|
|
|
|
dndProvided: any;
|
|
|
|
|
isDragDisabled: boolean;
|
|
|
|
|
color?: 'black' | 'white';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const DragZone = ({
|
|
|
|
|
dndProvided,
|
|
|
|
|
isDragDisabled,
|
|
|
|
|
color = 'black',
|
|
|
|
|
}: Props) => (
|
2022-05-01 18:00:38 +02:00
|
|
|
<span
|
|
|
|
|
className={`drag-zone${isDragDisabled ? ' drag-zone-disabled' : ''}`}
|
|
|
|
|
{...dndProvided.dragHandleProps}
|
|
|
|
|
>
|
2022-08-22 10:38:03 +02:00
|
|
|
<MdDragIndicator color={color} size={18} />
|
2022-05-01 18:00:38 +02:00
|
|
|
</span>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export default DragZone;
|