react-smart-gesture

0.0.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i react-smart-gesture

Weekly Downloads

1

Version

0.0.3

License

ISC

Last publish

Collaborators

  • yongx