2019-10-28 16:16:49 +00:00
|
|
|
import makeStyles from "@material-ui/core/styles/makeStyles";
|
2019-08-09 10:17:04 +00:00
|
|
|
import TableCell from "@material-ui/core/TableCell";
|
|
|
|
import React from "react";
|
|
|
|
import { SortableHandle as SortableHandleHoc } from "react-sortable-hoc";
|
|
|
|
|
|
|
|
import Draggable from "@saleor/icons/Draggable";
|
|
|
|
|
2019-10-28 16:16:49 +00:00
|
|
|
const useStyles = makeStyles(theme => ({
|
2019-08-09 10:17:04 +00:00
|
|
|
columnDrag: {
|
|
|
|
"&:first-child": {
|
2019-10-28 16:16:49 +00:00
|
|
|
paddingRight: theme.spacing(2)
|
2019-08-09 10:17:04 +00:00
|
|
|
},
|
|
|
|
cursor: "grab",
|
2019-10-28 16:16:49 +00:00
|
|
|
width: 48 + theme.spacing(1.5)
|
2019-08-09 10:17:04 +00:00
|
|
|
}
|
|
|
|
}));
|
|
|
|
|
|
|
|
const SortableHandle = SortableHandleHoc(() => {
|
|
|
|
const classes = useStyles({});
|
|
|
|
|
|
|
|
return (
|
|
|
|
<TableCell className={classes.columnDrag}>
|
|
|
|
<Draggable />
|
|
|
|
</TableCell>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
export default SortableHandle;
|