0.0.3 • Published 8 years ago

vj-top v0.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

vj-top

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

安装

$ npm i vj-top -S

API

Top props

namedescriptiontypedefaultsince
className按钮的classString''0.0.3
style按钮的内联样式Object{}0.0.3
threshold触发按钮显示的top距离Number3000.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;
0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago