README
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.