react-scroll-log-text

1.0.0 • Public • Published

NPM JavaScript Style Guide

react-scroll-log-text

react js 文字滚动插件, push一条新数据,滚动一次。

Document

安装

yarn add react-scroll-log-text // or npm install --save react-scroll-log-text

使用

import React, { Component } from 'react'

import MyComponent from 'react-scroll-log-text'
import 'react-scroll-log-text/dist/index.css'

class Example extends Component {
  render() {
    return <MyComponent />
  }
}

参数

字段 描述 类型 默认值
data 数据 Array or Object []
animateSpeed 动画滚动过渡时间,单位:秒 Number 1
length 大于length条数据开始滚动 Number 5
liStyle li标签的sytle (像素必须加单位px) Object
childrenFc 自定义渲染item组件,如data为多个字段时 function

举个例子:example

License

MIT © rfw

Package Sidebar

Install

npm i react-scroll-log-text

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

252 kB

Total Files

8

Last publish

Collaborators

  • rfw