nylas-booking-form
Overview
The nylas-booking-form
component is a UI component that allows users to book an event.
The booking form component.
Version | 1.1.0-canary.14 |
Install (React) | npm install @nylas/react |
Import (React) | import { NylasBookingForm } from '@nylas/react'; |
Example
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
bookingInfo | booking-info | The booking info. | any | undefined |
eventInfo | — | The booked event (Used to track if a booking is created in an eventOverride). | undefined | { booking_id: string; organizer: { email: string; name: string; is_organizer?: boolean | undefined; }; title: string; description: string; status: string; } | undefined |
isLoading | is-loading | The loading state. | boolean | undefined | undefined |
Events
Event | Description | Type |
---|---|---|
backButtonClicked | This event is fired when the cancel button is clicked. | CustomEvent<boolean> |
bookingFormError | This event is fired when an error occurs in the booking form. | CustomEvent<{ id?: string | undefined; type?: NotificationType | undefined; title?: string | undefined; code?: number | undefined; category?: string | undefined; description?: string | undefined; ttl?: number | "none" | undefined; }> |
bookingFormSubmitted | This event is fired when the booking form is submitted. | CustomEvent<void> |
detailsConfirmed | This event is fired when the book button is clicked and the form is valid. | CustomEvent<NylasSchedulerBookingData> |
emailChanged | This event is fired when the email is changed. | CustomEvent<string> |
nameChanged | This event is fired when the name is changed. | CustomEvent<string> |
Slots
Slot | Description |
---|---|
"custom-booking-form" | The custom booking form. |
Shadow Parts
Part | Description |
---|---|
"nbf" | The booking form host. |
"nbf__button-ghost" | The ghost button for adding guests. |
"nbf__button-outline" | The outline button for canceling. |
"nbf__button-primary" | The primary button for booking. |
"nbf__input-label" | The input label. |
"nbf__input-textfield" | The input textfield. |
Built with StencilJS