vj-top

0.0.3 • Public • Published

vj-top

基于react的简单返回顶部按钮

安装

$ npm i vj-top -S

API

Top props

name description type default since
className 按钮的class String '' 0.0.3
style 按钮的内联样式 Object {} 0.0.3
threshold 触发按钮显示的top距离 Number 300 0.0.2
bottom 按钮离底部的距离(0.0.2 之后废弃) Number '' 0.0.1

示例

 
import React, { Component } from 'react';
 
import Top from 'vj-top';
 
class Example extends Component {
  constructor(props) {
    super(props);
  };
  render() {
    return (
      <div>
        <div style={{height: '2000px'}}></div>
        <Top />
      </div>
    );
  };
};
 
export default Example;
 

Readme

Keywords

none

Package Sidebar

Install

npm i vj-top

Weekly Downloads

2

Version

0.0.3

License

ISC

Last publish

Collaborators

  • webrischa