Socket
Socket
Sign inDemoInstall

@bearei/react-timeline

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bearei/react-timeline

Base timeline components that support React and React native


Version published
Maintainers
1
Created
Source

react-timeline

Base timeline components that support React and React native

Installation

yarn add @bearei/react-timeline --save

Parameters

NameTypeRequiredDescription
itemsBaseTimeLineItemPropsTimeline items
renderMain(props: TimeLineMainProps) => ReactNodeRender the timeline main
renderContainer(props: TimeLineContainerProps) => ReactNodeRender the timeline container
Timeline Item
NameTypeRequiredDescription
contentReactNodeTimeline content
dotReactNodeCustom timeline points
renderMain(props: TimeLineItemMainProps) => ReactNodeRender the timeline item main
renderContainer(props: TimeLineItemContainerProps) => ReactNodeRender the timeline item container

Use

import React from 'React';
import ReactDOM from 'react-dom';
import Tag from '@bearei/react-time-line';

const timeline = (
  <Timeline
    items={[{ content: '1' }]}
    renderMain={({ items, ...props }) => (
      <div>
        {items?.map((item, index) => (
          <TimelineItem
            {...item}
            key={index}
            renderMain={({ content }) => <div>{content}</div>}
            renderContainer={({ children }) => <div>{children}</div>}
          />
        ))}
      </div>
    )}
    renderContainer={({ id, children }) => (
      <div data-id={id} tabIndex={1}>
        {children}
      </div>
    )}
  />
);

ReactDOM.render(timeline, container);

Keywords

FAQs

Package last updated on 06 Feb 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc