CAL-1558: Fixed responsiveness of booker for small calendar layout (#8660)
* CAL-1558: Fixed responsiveness of booker for small calendar layout * Remove commented code
This commit is contained in:
@@ -121,13 +121,19 @@ const BookerComponent = ({ username, eventSlug, month, rescheduleBooking }: Book
|
||||
<div
|
||||
style={resizeAnimationConfig[layout]?.[bookerState] || resizeAnimationConfig[layout].default}
|
||||
className={classNames(
|
||||
// Size settings are abstracted on their own lines purely for readbility.
|
||||
// General sizes:
|
||||
"[--booker-main-width:480px] [--booker-timeslots-width:240px] lg:[--booker-timeslots-width:280px]",
|
||||
"bg-muted grid max-w-full items-start overflow-clip dark:[color-scheme:dark] md:flex-row",
|
||||
// Sizes only applicable for small_calendar
|
||||
layout === "small_calendar" &&
|
||||
"border-subtle mt-20 min-h-[450px] w-[calc(var(--booker-meta-width)+var(--booker-main-width))] rounded-md border [--booker-meta-width:280px]",
|
||||
layout !== "small_calendar" &&
|
||||
"h-auto min-h-screen w-screen [--booker-meta-width:340px] lg:[--booker-meta-width:424px]",
|
||||
"transition-[width] duration-300"
|
||||
"w-[calc(var(--booker-meta-width)+var(--booker-main-width))] [--booker-meta-width:240px] lg:[--booker-meta-width:280px]",
|
||||
// Sizes for fullscreen layouts:
|
||||
layout !== "small_calendar" && "[--booker-meta-width:340px] lg:[--booker-meta-width:424px]",
|
||||
// Other styles
|
||||
"bg-muted grid max-w-full items-start overflow-clip dark:[color-scheme:dark] md:flex-row",
|
||||
layout === "small_calendar" && "border-subtle mt-20 min-h-[450px] rounded-md border",
|
||||
layout !== "small_calendar" && "h-auto min-h-screen w-screen",
|
||||
"transition-[width,max-width] duration-300"
|
||||
)}>
|
||||
<AnimatePresence>
|
||||
<StickyOnDesktop key="meta" className="relative z-10">
|
||||
|
||||
@@ -58,9 +58,10 @@ export const resizeAnimationConfig: ResizeAnimationConfig = {
|
||||
gridTemplateColumns: "var(--booker-meta-width) var(--booker-main-width)",
|
||||
},
|
||||
selecting_time: {
|
||||
width: "calc(var(--booker-meta-width) + var(--booker-main-width) + var(--booker-timeslots-width))",
|
||||
width: "100%",
|
||||
maxWidth: "calc(var(--booker-meta-width) + var(--booker-main-width) + var(--booker-timeslots-width))",
|
||||
gridTemplateAreas: `"meta main timeslots"`,
|
||||
gridTemplateColumns: "var(--booker-meta-width) var(--booker-main-width) var(--booker-timeslots-width)",
|
||||
gridTemplateColumns: "var(--booker-meta-width) 1fr var(--booker-timeslots-width)",
|
||||
},
|
||||
},
|
||||
large_calendar: {
|
||||
|
||||
Reference in New Issue
Block a user