Socket
Socket
Sign inDemoInstall

abc-timeline

Package Overview
Dependencies
60
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    abc-timeline

提供时间线数据展示,支持自定义时间节点


Version published
Maintainers
1
Created

Readme

Source

时间线组件

提供时间线数据展示,支持自定义时间节点

适用范围

适合需要按照时间先后顺序展示数据的场景

代码演示

<TimeLine
    data={MOCK_DATA.data}
    limit={5}
    onClickItem={(data) => {}}
    timeItem={(props) => {
        let {data = {}} = props;
        let url = data.url;
        return (
            <div className={"analyzer-timeline"}>
                <p className={"timeline-title"}>
                    <a href={url} target="_blank" title={data.title || "--"} >{data.title || "--"}</a>
                </p>
                <p className={"timeline-bottom"}>
                    <Icon className={"timeline-bottom-icon"} 
                        type={data.type === 'wechat' ? 'wechat' : 'profile'}/>
                    <span className={"abc-timeline-bottom-text"}>{data.source || "--"}</span>
                    <span className={"abc-timeline-bottom-text"}>{data.time ? moment(data.time).format("YYYY/MM/DD") : "--"}</span>
                </p>
            </div>
        )
    }} />

API

参数说明类型默认值
data时间线数据array--
limit限制展示的节点数number--
onClickItem点击节点事件function--
timeItem自定义时间节点element--

FAQs

Last updated on 12 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc