Skip to content

Latest commit

 

History

History
90 lines (77 loc) · 1.7 KB

README.md

File metadata and controls

90 lines (77 loc) · 1.7 KB

simple-vertical-timeline

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save simple-vertical-timeline

Usage

import React, { Component } from 'react'

import Timeline from 'simple-vertical-timeline'
import 'simple-vertical-timeline/dist/index.css'

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

API

props

name type default description example
values
[
  {
    from: String,
    to: String,
    title: String,
    description: String
  },
  {
    from: String,
    to: String,
    title: String,
    description: String
  }
  ...
]
data to render in timeline. Should be a list of data objects
[
      {
        from: "Oct 2010",
        to: "Oct 2011",
        title: "Company A",
        description: "Worked as a X in Company A............"
      },
      {
        from: "Nov 2011",
        to: "Nov 2012",
        title: "Company B",
        description: "Worked as a Y in Company B............."
      }
    ]

License

MIT © amiranga