react-native-calendars
Version:
React Native Calendar Components
138 lines (137 loc) • 4.1 kB
JSON
{
"name": "Timeline",
"description": "Timeline component",
"images": [
"https://github.com/wix/react-native-calendars/blob/master/demo/assets/timeline-calendar.gif?raw=true"
],
"extends": ["ScrollView"],
"extendsLink": ["https://reactnative.dev/docs/scrollview"],
"example": "https://github.com/wix/react-native-calendars/blob/master/example/src/screens/timelineCalendarScreen.tsx",
"props": [
{
"name": "date",
"type": "string | string[]",
"description": "The date / dates of this timeline instance in ISO format (e.g. 2011-10-25)"
},
{
"name": "events",
"type": "Event[]",
"description": "List of events to render on the timeline"
},
{
"name": "start",
"type": "number",
"description": "The timeline day start time",
"default": "0"
},
{
"name": "end",
"type": "number",
"description": "The timeline day end time",
"default": "24"
},
{
"name": "onEventPress",
"type": "(event: Event) => void",
"description": "Handler which gets executed when event is pressed"
},
{
"name": "onBackgroundLongPress",
"type": "(timeString: string, time: NewEventTime) => void",
"description": "Handler which gets executed when background is long pressed. Pass to handle creation of a new event"
},
{
"name": "onBackgroundLongPressOut",
"type": "(timeString: string, time: NewEventTime) => void",
"description": "Handler which gets executed when background's long pressed released. Pass to handle creation of a new event"
},
{
"name": "theme",
"type": "Theme",
"description": "Specify theme properties to override specific styles for calendar parts"
},
{
"name": "scrollToFirst",
"type": "boolean",
"description": "Whether to scroll to the first event"
},
{
"name": "scrollToNow",
"type": "boolean",
"description": "Whether to scroll to the current time on first render",
"default": "false"
},
{
"name": "initialTime",
"type": "NewEventTime",
"description": "The initial time to scroll to when the timeline is first rendered",
"default": "{ hour: 0, minute: 0 }"
},
{
"name": "format24h",
"type": "boolean",
"description": "Whether to use 24 hours format for the timeline hours",
"default": "true"
},
{
"name": "renderEvent",
"type": "(event: PackedEvent) => JSX.Element",
"description": "Specify a custom event block"
},
{
"name": "showNowIndicator",
"type": "boolean",
"description": "Whether to show the now indicator",
"default": "false"
},
{
"name": "scrollOffset",
"type": "number",
"description": "A scroll offset value that the timeline will sync with"
},
{
"name": "onChangeOffset",
"type": "(offset: number) => void",
"description": "Listen to onScroll event of the timeline component"
},
{
"name": "overlapEventsSpacing",
"type": "number",
"description": "Spacing between overlapping events",
"default": "10"
},
{
"name": "rightEdgeSpacing",
"type": "number",
"description": "Spacing to keep at the right edge (for background press)",
"default": "10"
},
{
"name": "unavailableHours",
"type": "UnavailableHours[]",
"description": "Range of available hours"
},
{
"name": "unavailableHoursColor",
"type": "string",
"description": "Background color for unavailable hours"
},
{
"name": "numberOfDays",
"type": "number",
"description": "The number of days to present in the timeline calendar",
"default": "1"
},
{
"name": "timelineLeftInset",
"type": "number",
"description": "The left inset of the timeline calendar (sidebar width)",
"default": "72"
},
{
"name": "testID",
"type": "string",
"description": "Identifier for testing"
}
]
}