You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`react-calendar-timeline` has `react`, `react-dom`, [`moment`](http://momentjs.com/) and [`interactjs`](http://interactjs.io/docs/) as peer dependencies.
19
+
`react-calendar-timeline` has [react](https://reactjs.org/), [react-dom](https://reactjs.org/docs/react-dom.html), [`moment`](http://momentjs.com/) and [`interactjs`](http://interactjs.io/docs/) as peer dependencies.
20
20
21
21
# Usage
22
22
@@ -88,7 +88,7 @@ Expects either a vanilla JS array or an immutableJS array, consisting of objects
88
88
}
89
89
```
90
90
91
-
If you use right sidebar, you can pass optional `rightTitle` property here.
91
+
If you use the right sidebar, you can pass optional `rightTitle` property here.
92
92
If you want to overwrite the calculated height with a custom height, you can pass a `height` property as an int in pixels here. This can be very useful for categorized groups.
93
93
94
94
## items
@@ -118,15 +118,15 @@ Expects either a vanilla JS array or an immutableJS array, consisting of objects
118
118
}
119
119
```
120
120
121
-
The preferred (fastest) option is to give unix timestamps in milliseconds for `start_time` and `end_time`. Objects that convert to them (JavaScript Date or moment()) will also work, but will be a lot slower.
121
+
The preferred (fastest) option is to give Unix timestamps in milliseconds for `start_time` and `end_time`. Objects that convert to them (JavaScript `Date` or `moment()`) will also work, but will be a lot slower.
122
122
123
123
## defaultTimeStart and defaultTimeEnd
124
124
125
125
Unless overridden by `visibleTimeStart` and `visibleTimeEnd`, specify where the calendar begins and where it ends. This parameter expects a Date or moment object.
126
126
127
127
## visibleTimeStart and visibleTimeEnd
128
128
129
-
The exact viewport of the calendar. When these are specified, scrolling in the calendar must be orchestrated by the `onTimeChange` function. This parameter expects a unix timestamp in milliseconds.
129
+
The exact viewport of the calendar. When these are specified, scrolling in the calendar must be orchestrated by the `onTimeChange` function. This parameter expects a Unix timestamp in milliseconds.
130
130
131
131
**Note that you need to provide either `defaultTimeStart/End` or `visibleTimeStart/End` for the timeline to function**
132
132
@@ -179,8 +179,7 @@ The minimum width, in pixels, of a timeline entry when it's possible to resize.
179
179
180
180
## stickyOffset
181
181
182
-
At what height from the top of the screen should we start "sticking" the header (i.e. position: sticky)? This is useful if for example you already have
183
-
a sticky navbar and want to push the timeline header down further. Defaults `0`.
182
+
At what height from the top of the screen should we start "sticking" the header (i.e. position: sticky)? This is useful if for example you already have a sticky navbar and want to push the timeline header down further. Defaults `0`.
184
183
185
184
## stickyHeader
186
185
@@ -216,7 +215,7 @@ Largest time the calendar can zoom to in milliseconds. Default `5 * 365.24 * 864
216
215
217
216
## clickTolerance
218
217
219
-
How many pixels we can drag the background for it to be counted as a click on the background. Defualt:`3`
218
+
How many pixels we can drag the background for it to be counted as a click on the background. Default`3`
220
219
221
220
## canMove
222
221
@@ -435,9 +434,9 @@ Called when the bounds in the calendar's canvas change. Use it for example to lo
435
434
436
435
## itemRenderer
437
436
438
-
Render prop function used to render a customized item. The function provides multiple paramerters that can be used to render each item.
437
+
Render prop function used to render a customized item. The function provides multiple parameters that can be used to render each item.
439
438
440
-
Paramters provided to the function has two types: context params which have the state of the item and timeline, and prop getters functions
439
+
Parameters provided to the function has two types: context params which have the state of the item and timeline, and prop getters functions
441
440
442
441
#### Render props params
443
442
@@ -490,7 +489,7 @@ Rather than applying props on the element yourself and to avoid your props being
490
489
*`getItemProps` returns the props you should apply to the root item element. The returned props are:
491
490
492
491
* key: item id
493
-
* ref: function to get item referance
492
+
* ref: function to get item reference
494
493
* className: classnames to be applied to the item
495
494
* onMouseDown: event handler
496
495
* onMouseUp: event handler
@@ -500,9 +499,9 @@ Rather than applying props on the element yourself and to avoid your props being
500
499
* onContextMenu: event handler
501
500
* style: inline object style
502
501
503
-
\*\*_the given styles will only override the styles that are not a requirement for postioning the item. Other styles like `color`, `radius` and others_
502
+
\*\*_the given styles will only override the styles that are not a requirement for positioning the item. Other styles like `color`, `radius` and others_
504
503
505
-
These properties can be override using the prop argument with proprties:
504
+
These properties can be override using the prop argument with properties:
506
505
507
506
* className: class names to be added
508
507
* onMouseDown: event handler will be called after the component's event handler
0 commit comments