bump yarn lock after gatsby version updates
This commit is contained in:
parent
5e722fc685
commit
ecb458e37c
@ -29,11 +29,11 @@
|
||||
"dependencies": {
|
||||
"classnames": "^2.2.6",
|
||||
"docz": "^2.2.0",
|
||||
"gatsby": "2.19.24",
|
||||
"gatsby-plugin-postcss": "^2.1.20",
|
||||
"gatsby-plugin-react-svg": "^3.0.0",
|
||||
"gatsby-plugin-sass": "^2.1.28",
|
||||
"gatsby-theme-docz": "^2.2.0",
|
||||
"gatsby": "2.22.19",
|
||||
"gatsby-plugin-postcss": "2.3.3",
|
||||
"gatsby-plugin-react-svg": "3.0.0",
|
||||
"gatsby-plugin-sass": "2.3.3",
|
||||
"gatsby-theme-docz": "2.3.1",
|
||||
"moment": "^2.24.0",
|
||||
"node-sass": "^4.13.1",
|
||||
"prop-types": "^15.7.2",
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
import React from 'react';
|
||||
import { DndProvider } from "react-dnd";
|
||||
import PropTypes from 'prop-types';
|
||||
import { DndProvider } from 'react-dnd';
|
||||
import HTML5Backend from 'react-dnd-html5-backend';
|
||||
import TouchBackend from 'react-dnd-touch-backend';
|
||||
|
||||
const isTouchDevice = typeof window !== `undefined` && !!('ontouchstart' in window || navigator.maxTouchPoints);
|
||||
const isTouchDevice =
|
||||
typeof window !== `undefined` &&
|
||||
!!('ontouchstart' in window || navigator.maxTouchPoints);
|
||||
|
||||
/**
|
||||
* Relevant:
|
||||
@ -13,7 +16,7 @@ const isTouchDevice = typeof window !== `undefined` && !!('ontouchstart' in wind
|
||||
* Docs:
|
||||
* http://react-dnd.github.io/react-dnd/docs/api/drag-drop-context
|
||||
*/
|
||||
export default function DragAndDropProvider({children}) {
|
||||
function DragAndDropProvider({ children }) {
|
||||
const backend = isTouchDevice ? TouchBackend : HTML5Backend;
|
||||
const opts = isTouchDevice ? { enableMouseEvents: true } : {};
|
||||
|
||||
@ -23,3 +26,9 @@ export default function DragAndDropProvider({children}) {
|
||||
</DndProvider>
|
||||
);
|
||||
}
|
||||
|
||||
DragAndDropProvider.propTypes = {
|
||||
children: PropTypes.any,
|
||||
};
|
||||
|
||||
export default DragAndDropProvider;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user