nylas-timeslot-picker
Overview
The nylas-timeslot-picker
component is a UI component that allows users to select a timeslot from a list of available timeslots.
Version | 1.1.0-canary.14 |
Install (React) | npm install @nylas/react |
Import (React) | import { NylasTimeslotPicker } from '@nylas/react'; |
Example
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
availability | — | The available timeslots. | AvailabilityTimeslot[] | undefined | undefined |
isLoading | loading-state | The loading state prop. Used to display loading state when fetching availability. | boolean | undefined | undefined |
selectedDate | — | The selected date. | Date | undefined | new Date() |
selectedTimeslot | — | The selected timeslot. | undefined | { start_time: Date; end_time: Date; } | undefined |
selectedTimezone | selected-timezone | The selected timezone. | string | Intl.DateTimeFormat().resolvedOptions().timeZone |
Events
Event | Description | Type |
---|---|---|
timeslotConfirmed | This event is fired when a timeslot is confirmed. By default, this will proceed to the booking form page. | CustomEvent<{ start_time: Date; end_time: Date; }> |
timeslotSelected | This event is fired when a timeslot is selected. | CustomEvent<{ start_time: Date; end_time: Date; }> |
Slots
Slot | Description |
---|---|
"timeslot-picker-cta-label" | The label for the timeslot picker CTA. Default is “Next”. |
Shadow Parts
Part | Description |
---|---|
"ntp" | The timeslot picker component. |
"ntp__button-primary" | The timeslot picker CTA. |
"ntp__timeslot" | The timeslot button. |
"ntp__timeslot--selected" | The selected timeslot button. |
Graph
Built with StencilJS