0.1.0 • Published 6 years ago

react-continuum v0.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

React-Continuum

A React component to help with displaying overlaying events and tasks.

Timeline Props

PropTypeDescriptionDefault
dataTimelineData[]The data to display in the timelineRequired
heightNumberThe height of the timeline in pixelsRequired
viewStartMoment or DateTimeStringThe initial view startRequired
viewEndMoment or DateTimeStringThe initial view endRequired
targetDivisionsNumberThe number of divisions when rendering guidelines10
renderDatum(datum: ExtendedTimelineData) => ReactNodeRender function to use instead of the built in render, this will override all base styles other than positioning of the elementNone

TimelineData

KeyValueTypeDescription
startMomentThe start moment of this datum
endMomentThe end moment of this datum
labelStringThe label associated with this datum

Example

let data = [
    {
        start: Moment().subtract(2, 'days'),
        end: Moment(),
        label: 'Task 1',
    },
    {
        start: Moment().subtract(1, 'days'),
        end: Moment().add(1, 'days'),
        label: 'Task 2',
    },
    {
        start: Moment(),
        end: Moment().add(2, 'days'),
        label: 'Task 3',
    },
];

let viewStart = Moment().subtract(4, 'days');
let viewEnd = Moment().add(4, 'days');

return (
    <Timeline
        height={600}
        data={data}
        viewStart={viewStart}
        viewEnd={viewEnd}
    />
);

Screenshot

alt text

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago