@beisen/timeline-wrapper
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

时间轴容器组件

这个组件用在工作汇报上,作为每一个汇报项的容器,并自动在外层生成一个时间轴,以及各项之间的分隔线

注意

在渲染列表时,时间轴容器组件必须作为列表项的根节点,才能正常的渲染时间轴,否则将不能判断位置关系

示例

import React from 'react';
import TimelineWrapper from '../../src'

const data = [1, 2,3,4,5]

export default function(){
  let els = data.map(item => {
    return <TimelineWrapper key={item}>
      <div style={{height: 100, fontSize:'20px'}}>
        <span style={{lineHeight:'28px'}}>hello {item}</span>
      </div>
    </TimelineWrapper>
  })
  return <div>
    {els}
  </div>
}

Readme

Keywords

none

Package Sidebar

Install

npm i @beisen/timeline-wrapper

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

4.47 kB

Total Files

6

Last publish

Collaborators

  • albert-zhang
  • liugenpeng
  • beisencorp
  • lgm
  • neozw