0.0.2 • Published 6 years ago

@trbl/react-mouse-position v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

NPM Bundle Size Supported by TRBL

React Mouse Position

Here, mousey, mousey, mousey!

Quick Start

Installation

$ yarn add @trbl/react-mouse-position

Compositon

  import React from 'react';
  import { MousePositionProvider, withMousePosition } from '@trbl/react-mouse-position';

  const MyComponent = withMousePosition(() => return <div>My Component</div>);

  const App = () => {
    return (
      <MousePositionProvider>
        <MyComponent>
          ...
        </MyComponent>
      </MousePositionProvider>
    )
  }

  export default App;

Demo

To demo locally, clone the repo and

$ yarn install
$ npm run dev
$ open http://localhost:3000

Documentation

All available props can be found via the references below:

License

MIT Copyright (c) TRBL, LLC

0.0.2

6 years ago

0.0.1

6 years ago