planett-go-back-to-top-simple

1.0.1 • Public • Published

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.

Dependents (0)

Package Sidebar

Install

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

Homepage

planett.tw

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • hsuting