Permalink
Browse files

useGesture

  • Loading branch information...
drcmda committed Nov 4, 2018
1 parent 322d6f8 commit 0094001fba5294bab707a816dc9f8fc59e8a3052
Showing with 890 additions and 774 deletions.
  1. +17 −0 .babelrc
  2. +0 −16 .babelrc.js
  3. +8 −0 README.md
  4. +18 −17 package.json
  5. +185 −116 src/index.js
  6. +662 −625 yarn.lock
@@ -0,0 +1,17 @@
{
"presets": [
["@babel/preset-env", { "loose": true, "modules": false }],
"@babel/preset-react"
],
"plugins": [
["@babel/proposal-class-properties", { "loose": true }],
["transform-react-remove-prop-types", { "removeImport": true }]
],
"env": {
"test": {
"plugins": [
"@babel/transform-modules-commonjs"
]
}
}
}

This file was deleted.

Oops, something went wrong.
@@ -52,3 +52,11 @@ class Something extends React.Component {
}
}
```

or ...

```jsx
const [handlers, { down, x, y, xDelta, yDelta, xInitial, yInitial }] = useGesture()
return (
<div {...handlers}>Drag me! coordinates: {x}, {y}</div>
```
@@ -1,6 +1,6 @@
{
"name": "react-with-gesture",
"version": "1.0.10",
"version": "2.0.0-beta.0",
"description": "hoc for receiving gestures",
"main": "dist/react-with-gesture",
"module": "dist/react-with-gesture.es",
@@ -30,24 +30,25 @@
},
"homepage": "https://github.com/drcmda/react-with-gesture#readme",
"devDependencies": {
"@babel/core": "7.0.0-beta.40",
"@babel/plugin-transform-runtime": "7.0.0-beta.40",
"@babel/preset-env": "7.0.0-beta.40",
"@babel/preset-react": "7.0.0-beta.40",
"@babel/preset-stage-2": "7.0.0-beta.40",
"@babel/runtime": "7.0.0-beta.40",
"@types/react": "^16.4.9",
"@babel/core": "7.1.2",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-transform-runtime": "7.1.0",
"@babel/preset-env": "7.1.0",
"@babel/preset-react": "7.0.0",
"@babel/preset-stage-2": "7.0.0",
"@babel/runtime": "7.1.2",
"@types/react": "^16.4.18",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "22.4.0",
"babel-plugin-annotate-pure-calls": "0.3.0-beta.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.13",
"react": "16.2.0",
"react-dom": "16.2.0",
"babel-jest": "23.6.0",
"babel-plugin-annotate-pure-calls": "0.4.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.19",
"react": "16.6.0",
"react-dom": "16.6.0",
"rimraf": "2.6.2",
"rollup": "0.56.2",
"rollup-plugin-babel": "4.0.0-beta.2",
"typescript": "^3.0.1",
"typings-tester": "^0.3.1"
"rollup": "0.67.0",
"rollup-plugin-babel": "4.0.3",
"typescript": "^3.1.6",
"typings-tester": "^0.3.2"
},
"peerDependencies": {
"prop-types": "15.x.x",
Oops, something went wrong.

0 comments on commit 0094001

Please sign in to comment.