2021-02-10 07:29:18 +00:00
|
|
|
import styled from "styled-components";
|
|
|
|
|
2021-02-25 21:19:45 +00:00
|
|
|
import Base from "../themes/base";
|
2021-02-24 17:11:23 +00:00
|
|
|
import { tablet } from "../utils/device";
|
2021-02-10 07:29:18 +00:00
|
|
|
|
|
|
|
const StyledDragAndDrop = styled.div`
|
|
|
|
/*-webkit-touch-callout: none;
|
|
|
|
-webkit-user-select: none;
|
|
|
|
-moz-user-select: none;
|
|
|
|
-ms-user-select: none;
|
|
|
|
user-select: none;*/
|
|
|
|
height: ${(props) => props.theme.dragAndDrop.height};
|
|
|
|
border: ${(props) =>
|
|
|
|
props.drag
|
|
|
|
? props.theme.dragAndDrop.border
|
|
|
|
: props.theme.dragAndDrop.transparentBorder};
|
|
|
|
margin-left: -2px;
|
|
|
|
|
|
|
|
@media ${tablet} {
|
|
|
|
border: none;
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
outline: none;
|
|
|
|
background: ${(props) =>
|
|
|
|
props.dragging
|
|
|
|
? props.isDragAccept
|
|
|
|
? props.theme.dragAndDrop.acceptBackground
|
|
|
|
: props.theme.dragAndDrop.background
|
|
|
|
: "none !important"};
|
|
|
|
`;
|
|
|
|
|
|
|
|
StyledDragAndDrop.defaultProps = { theme: Base };
|
|
|
|
|
|
|
|
export default StyledDragAndDrop;
|