1.0.1 • Published 8 years ago

planett-go-back-to-top-simple v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Planett Go Back To Top Simple

This is a react class bind a go back to top function. You can give a component to it and a data for the props of this component.

Install

  npm install planett-go-back-to-top-simple

Usage

  import React from 'react';
  import ReactDOM from 'react-dom';
  import GoBack from 'planett-go-back-to-top-simple';

  import Component from 'your/path/to/component';

  let data = {
    'contolDom': 'main',
    'component': Component,
    'data': {}
  };

  React.Render(<GoBack data={ data } />, documnet.getElementById('root'));
  • contolDom: this is whose scroll bar you need to control.