Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

uxcore-totop

uxcore36MIT0.6.1

uxcore-totop component for uxcore.

react, react-component, uxcore-totop, Totop

readme


NPM version build status Test Coverage Dependency Status devDependency Status NPM downloads

Sauce Test Status

setup develop environment

$ git clone https://github.com/uxcore/uxcore-totop
$ cd uxcore-totop
$ npm install
$ gulp server

Usage

<Totop>
    <div className="block1">了解我们</div>
    <div className="block2"><i className="kuma-icon kuma-icon-comment"></i></div>
</Totop>

demo

http://uxcore.github.io/

API

Props

配置项 类型 必填 默认值 功能/备注
prefixCls string optional "kuma-totop" 不想使用 kuma 主题时使用
className string optional - 额外的顶级类名
to number optional 10 回到顶部时据顶端距离,单位 px
distance number optional 30 向下滑多少距离出现回到顶部
duration number optional 600 动画持续时间

TotopBox props

配置项 类型 必填 默认值 功能/备注
label string require |
icon React.Element require |推荐使用iconfont,见demo
onClick function optional

changelog

0.6.0

  • CHANGED adapt react@16.x
  • CHANGED update uxcore-popover to ^0.6.1

0.5.0

  • CHANGED update react version 15.x

0.4.0

  • CHANGED new icon

0.3.0

  • NEW add new prop onTotopEnd
  • NEW add tests
  • CHANGED update uxcore-popover to ~0.4.0
  • CHANGED use unstable_renderSubtreeIntoContainer

0.2.0

CHANGED new style

0.1.2

CHANGED update scaffold

0.1.1

FIXED fix ie8 scrollTop bug