0.0.3 • Published 8 years ago

react-smart-gesture v0.0.3

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

react-smart-gesture

鼠标手势组件 smart-gesture 的 React 版本。

安装

npm install react-smart-gesture --save

使用

import React, { Component } from 'react';
import SmartGesture from 'react-smart-gesture';

class App extends Component {
  _onGesture(res, points) {
    console.log(res, points);
  }

  render() {
    const options = {
      lineColor: 'red',
      onGesture: this._onGesture,
    };
    return (
      <div className="demo">
		<SmartGesture options={options} />
      </div>
    );
  }
}

export default App;

详细使用方法可以参考: demo

文档

参考 smart-gesture 文档

贡献指南

请在提交 PR 前阅读我们的贡献指南

License

MIT

0.0.3

8 years ago

0.0.1

8 years ago