1.3.1 • Published 2 months ago

react-status-timeline v1.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

react-status-timeline

Status timeline for React.js

NPM JavaScript Style Guide downloads

Demo

https://tranhoandz98.github.io/react-status-timeline/

Install

npm install --save react-status-timeline

Or

yarn add react-status-timeline

Usage

import React, { Component } from 'react'

import StatusTimeLine from 'react-status-timeline'
import 'react-status-timeline/dist/index.css'

const App = () => {
  return <StatusTimeLine/>
}

export default App

User guide

StatusTimeLine

Props

Prop nameDescriptionDefault valueExample values
classNameClass name(s) that will be added to rendered element along with the default StatusTimeLinen/aString: "class-name-1 class-name-2"
dataArray data status{status: 'complete',color: success',stepName: 'Đã xong',statusStep: 'Hoàn thành',step: 'Bước 1',},{status: 'cancel',color: 'danger',stepName: 'Từ chối rồi',statusStep: 'Từ chối',step: Bước 2'}Default value
statusCurrentCurrent state of the timeline2Number: 1
isStartShow start status defaulttrueBoolean: truefalse
isEndShow end status defaulttrueBoolean: truefalse
onErrorFunction run when errorn/aFunction: ...
txtStartText start status"Bắt đầu"String: "Write something"
txtActionStartAction default start status"Soạn thảo"String: "Write something"
txtEndText end status"Kết thúc"String: "Write something"
txtActionEndAction default end status"Hoàn thành"String: "Write something"
captionStepCaption name + step name - show in title attribute of each step"Tên bước: "String: "Write something"
txtStepText stand in front of the stepn/aString: "Write something"
classNameStartClass name(s) that will be added to render first element along with the default class "timeline__content" if isStart=truen/aString: "Write something"
classNameEndClass name(s) that will be added to render last element along with the default class "timeline__content" if isEnd=truen/aString: "Write something"

Props data

KeyDescriptionExample values
statusstatus of step"complete""waiting""cancel"
colorcolor tags of step"primary""success""info""warning""danger"
stepNameStep name - show in title attribute of each stepString: "Write something"
statusStepText statusString: "Write something"
stepAction statusString: "Write something"

className

ContentDescriptionExample values
timeline__tag--nonehide attribute tag with element has class "timeline__content"className="timeline__tag--none"

License

MIT © tranhoandz98

1.3.1

2 months ago

1.3.0

1 year ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago