nylas-booked-event-card

Overview

The nylas-booked-event-card component is a UI component that displays the booked event card.

Version1.1.4
Install (React)npm install @nylas/react
Import (React)import { NylasBookedEventCard } from '@nylas/react';
Import (CDN)<script type="module"> import { defineCustomElement } from "https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/nylas-booked-event-card/nylas-booked-event-card.es.js"; defineCustomElement(); </script>

Example


Properties

PropertyAttributeDescriptionTypeDefault
selectedLanguageThe selected language.stringnavigator.language
selectedTimeslot _(required)_The selected timeslot.{ start_time: Date; end_time: Date; emails?: string[] | undefined; }undefined
selectedTimezoneThe selected timezone.stringIntl.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.
PropertyAttributeDescriptionTypeDefault
bookingInfoThe booking info used to book / reschedule the event.anyundefined
configSettingsThe config settings for the scheduler.anyundefined
eventInfo _(required)_The booked event.{ booking_id: string; organizer: { email: string; name: string; is_organizer?: boolean | undefined; }; title: string; description: string; status: string; }undefined
isLoadingThe loading state prop. Used to display loading state when fetching availability.boolean | undefinedundefined
rescheduleBookingIdBooking flow type.string | undefinedundefined

Events

EventDescriptionType
cancelBookedEventValidationErrorThis event is fired when an error occurs while cancelling the booking.CustomEvent<{ error: { title: string; message: string; }; }>
cancelBookingButtonClickedCancel booking button clicked event.CustomEvent<{ bookingId: string; }>
rescheduleBookedEventErrorThis event is fired when an error occurs while rescheduling the booking.CustomEvent<NylasSchedulerErrorResponse>
rescheduleButtonClickedReschedule button clicked event.CustomEvent<{ bookingId: string; errorHandler?: ((error: NylasSchedulerErrorResponse) => void) | undefined; }>

Shadow Parts

PartDescription
"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