@multimatic/react-scroll-info

0.0.3 • Public • Published

Modify by Multimatic

React Scroll Info

A roll, as of parchment or papyrus, used especially in the writing of a document.

Quick Start

Installation

$ yarn add @multimatic/react-scroll-info

Composition

  import React from 'react';
  import { ScrollInfoProvider, withScrollInfo, useScrollInfo } from '@multimatic/react-scroll-info';

  const WithScrollInfo = withScrollInfo(() => <div>My Component</div>);
  const UseScrollInfo = () => <div>{useScrollInfo()}</div>;

  const App = () => {
    return (
      <ScrollInfoProvider>
        <WithScrollInfo />
        <UseScrollInfo />
      </ScrollInfoProvider>
    )
  }

  export default App;

Demo

To demo locally, clone the repo and

$ yarn
$ yarn dev
$ open http://localhost:3000

Documentation

All available props can be found via the references below:

  • ScrollInfoProvider
  • useScrollInfo
  • withScrollInfo

License

MIT Copyright (c) Multimatic, LLC

/@multimatic/react-scroll-info/

    Package Sidebar

    Install

    npm i @multimatic/react-scroll-info

    Weekly Downloads

    2

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    26.3 kB

    Total Files

    5

    Last publish

    Collaborators

    • ferdin
    • rapatel-mm