nylas-booked-event-card
Overview
The nylas-booked-event-card
component is a UI component that displays the booked event card.
Version | 1.4.3 |
Install (React) | npm install @nylas/react |
Import (React) | import { NylasBookedEventCard } from '@nylas/react'; |
Import (CDN) | You do not need to individually import the component, just import the parent component either nylas-scheduling or nylas-scheduler-editor . |
Example
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
hour12 | The 12-hour time format. | boolean | undefined | undefined | |
selectedLanguage | The selected language. | string | navigator.language | |
selectedTimeslot _(required)_ | The selected timeslot. | { start_time: Date; end_time: Date; emails?: string[] | undefined; capacity?: number | undefined; event_id?: string | undefined; master_id?: string | undefined; calendar_id?: string | undefined; } | undefined | |
selectedTimezone | The selected timezone. | string | Intl.DateTimeFormat().resolvedOptions().timeZone |
Standalone Props
ⓘ NOTE: The following props are automatically configured when used within nylas-scheduling. Set these props manually only if you’re using the component independently.
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
bookingInfo | The booking info used to book / reschedule the event. | undefined | { primaryParticipant: NylasSchedulerBookingParticipant; startTime?: Date | undefined; endTime?: Date | undefined; timezone?: string | undefined; language?: string | undefined; guests?: NylasSchedulerBookingParticipant[] | undefined; additionalFields?: Record<string, { value: string; type?: string | undefined; readOnly?: boolean | undefined; }> | undefined; } | undefined | |
configSettings | The config settings for the scheduler. | undefined | { configuration_id: string; booking?: { additional_fields: Record<string, string>; additional_guests: { email: string; name: string; }[]; booking_ref: string; booking_ref_salt: string; guest: { email: string; name: string; }; timezone: string; email_language: string; event_data: { location: string; when: { start_time: Date; end_time: Date; end_timezone: string; start_timezone: string; object: string; }; }; event_organizer: { name: string; email: string; is_organizer: boolean; }; } | undefined; scheduler: { available_days_in_future: number; min_cancellation_notice: number; min_booking_notice: number; rescheduling_url?: string | undefined; cancellation_url?: string | undefined; cancellation_policy?: string | undefined; hide_additional_guests?: boolean | undefined; hide_cancellation_options?: boolean | undefined; hide_rescheduling_options?: boolean | undefined; additional_fields?: Record<string, AdditionalFields> | undefined; confirmation_redirect_url?: string | undefined; organizer_confirmation_url?: string | undefined; }; organizer: { name: string; email: string; }; slug: string; appearance: Appearance; booking_type: string; name: string; } | undefined | |
eventInfo _(required)_ | The booked event. | { booking_id: string; organizer: { email: string; name: string; is_organizer?: boolean | undefined; }; title: string; description: string; status: string; } | undefined | |
isLoading | The loading state prop. Used to display loading state when fetching availability. | boolean | undefined | undefined | |
rescheduleBookingId | Booking flow type. | string | undefined | undefined | |
themeConfig | The theme configuration. | any | undefined |
Events
Event | Description | Type |
---|---|---|
cancelBookedEventValidationError | This event is fired when an error occurs while cancelling the booking. | CustomEvent<{ error: { title: string; message: string; }; }> |
cancelBookingButtonClicked | Cancel booking button clicked event. | CustomEvent<{ bookingId: string; }> |
rescheduleBookedEventError | This event is fired when an error occurs while rescheduling the booking. | CustomEvent<NylasSchedulerErrorResponse> |
rescheduleButtonClicked | Reschedule button clicked event. | CustomEvent<{ bookingId: string; errorHandler?: ((error: NylasSchedulerErrorResponse) => void) | undefined; }> |
Shadow Parts
Part | Description |
---|---|
"nbec" | The booked event card host. |
"nbec__button-outline" | The cancel & reschedule button CTA. |
"nbec__cancel-cta" | The cancel button CTA. |
"nbec__card" | The booked event card. |
"nbec__description" | The description of the booked event card. |
"nbec__reschedule-cta" | The reschedule button CTA. |
"nbec__title" | The title of the booked event card. |
Built with StencilJS