fix: passing props (#21670)
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
This commit is contained in:
co-authored by
Somay Chauhan
parent
90f55670dc
commit
0ee137efbb
@@ -408,6 +408,7 @@ const BookerComponent = ({
|
||||
!(layout === "mobile" && bookerState === "booking") && (
|
||||
<div className="mt-auto px-5 py-3">
|
||||
<DatePicker
|
||||
classNames={customClassNames?.datePickerCustomClassNames}
|
||||
event={event}
|
||||
slots={schedule?.data?.slots}
|
||||
isLoading={schedule.isPending}
|
||||
@@ -435,14 +436,7 @@ const BookerComponent = ({
|
||||
initial="visible"
|
||||
className="md:border-subtle ml-[-1px] h-full flex-shrink px-5 py-3 md:border-l lg:w-[var(--booker-main-width)]">
|
||||
<DatePicker
|
||||
classNames={{
|
||||
datePickerContainer: customClassNames?.datePickerCustomClassNames?.datePickerContainer,
|
||||
datePickerTitle: customClassNames?.datePickerCustomClassNames?.datePickerTitle,
|
||||
datePickerDays: customClassNames?.datePickerCustomClassNames?.datePickerDays,
|
||||
datePickerDate: customClassNames?.datePickerCustomClassNames?.datePickerDate,
|
||||
datePickerDatesActive: customClassNames?.datePickerCustomClassNames?.datePickerDatesActive,
|
||||
datePickerToggle: customClassNames?.datePickerCustomClassNames?.datePickerToggle,
|
||||
}}
|
||||
classNames={customClassNames?.datePickerCustomClassNames}
|
||||
event={event}
|
||||
slots={schedule?.data?.slots}
|
||||
isLoading={schedule.isPending}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { shallow } from "zustand/shallow";
|
||||
|
||||
import type { Dayjs } from "@calcom/dayjs";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import type { DatePickerClassNames } from "@calcom/features/bookings/Booker/types";
|
||||
import { DatePicker as DatePickerComponent } from "@calcom/features/calendars/DatePicker";
|
||||
import { useNonEmptyScheduleDays } from "@calcom/features/schedules/lib/use-schedule/useNonEmptyScheduleDays";
|
||||
import { weekdayToWeekIndex } from "@calcom/lib/dayjs";
|
||||
@@ -69,14 +70,7 @@ export const DatePicker = ({
|
||||
};
|
||||
slots?: Slots;
|
||||
isLoading?: boolean;
|
||||
classNames?: {
|
||||
datePickerContainer?: string;
|
||||
datePickerTitle?: string;
|
||||
datePickerDays?: string;
|
||||
datePickerDate?: string;
|
||||
datePickerDatesActive?: string;
|
||||
datePickerToggle?: string;
|
||||
};
|
||||
classNames?: DatePickerClassNames;
|
||||
scrollToTimeSlots?: () => void;
|
||||
}) => {
|
||||
const { i18n } = useLocale();
|
||||
|
||||
@@ -161,14 +161,7 @@ export type CustomClassNames = {
|
||||
eventMetaTimezoneSelect?: string;
|
||||
eventMetaChildren?: string;
|
||||
};
|
||||
datePickerCustomClassNames?: {
|
||||
datePickerContainer?: string;
|
||||
datePickerTitle?: string;
|
||||
datePickerDays?: string;
|
||||
datePickerDate?: string;
|
||||
datePickerDatesActive?: string;
|
||||
datePickerToggle?: string;
|
||||
};
|
||||
datePickerCustomClassNames?: DatePickerClassNames;
|
||||
availableTimeSlotsCustomClassNames?: {
|
||||
availableTimeSlotsContainer?: string;
|
||||
availableTimeSlotsHeaderContainer?: string;
|
||||
@@ -182,3 +175,12 @@ export type CustomClassNames = {
|
||||
backButton?: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type DatePickerClassNames = {
|
||||
datePickerContainer?: string;
|
||||
datePickerTitle?: string;
|
||||
datePickerDays?: string;
|
||||
datePickerDate?: string;
|
||||
datePickerDatesActive?: string;
|
||||
datePickerToggle?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user