From ba0e443c527f864a2d42af43fdf92a50511f09ab Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Fri, 10 Mar 2023 14:02:48 +0100 Subject: [PATCH] fixed scroll description size, fixed dark mode toggle switch, fixed date height and positioning, fixed date picker container with negative margin (#7656) --- .../web/components/booking/AvailableTimes.tsx | 10 ++-- .../components/booking/BookingDescription.tsx | 8 +-- apps/web/components/booking/SlotPicker.tsx | 2 +- .../booking/pages/AvailabilityPage.tsx | 2 +- packages/features/calendars/DatePicker.tsx | 49 ++++++++++--------- .../form/toggleGroup/ToggleGroup.tsx | 6 +-- 6 files changed, 42 insertions(+), 35 deletions(-) diff --git a/apps/web/components/booking/AvailableTimes.tsx b/apps/web/components/booking/AvailableTimes.tsx index 7c98534fe7..3fdca80f65 100644 --- a/apps/web/components/booking/AvailableTimes.tsx +++ b/apps/web/components/booking/AvailableTimes.tsx @@ -64,13 +64,13 @@ const AvailableTimes: FC = ({ return (
{!!date ? ( -
-
+
+
{nameOfDay(i18n.language, Number(date.format("d")), "short")} - + , {date.toDate().toLocaleString(i18n.language, { month: "short" })} {date.format(" D ")}
@@ -85,7 +85,9 @@ const AvailableTimes: FC = ({ />
-
+
{slots.length > 0 && slots.map((slot) => { type BookingURL = { diff --git a/apps/web/components/booking/BookingDescription.tsx b/apps/web/components/booking/BookingDescription.tsx index 76411e2d75..63a47a9988 100644 --- a/apps/web/components/booking/BookingDescription.tsx +++ b/apps/web/components/booking/BookingDescription.tsx @@ -83,20 +83,20 @@ const BookingDescription: FC = (props) => { size="sm" truncateAfter={3} /> -

+

{profile.name}

-

+

{eventType.title}

{eventType?.description && (
-
+
diff --git a/apps/web/components/booking/SlotPicker.tsx b/apps/web/components/booking/SlotPicker.tsx index 3fb71b6ce0..555d207eb6 100644 --- a/apps/web/components/booking/SlotPicker.tsx +++ b/apps/web/components/booking/SlotPicker.tsx @@ -164,7 +164,7 @@ export const SlotPicker = ({ monthSlots[k].length > 0)} diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx index 7ba03a4e71..534d5d4cf9 100644 --- a/apps/web/components/booking/pages/AvailabilityPage.tsx +++ b/apps/web/components/booking/pages/AvailabilityPage.tsx @@ -168,7 +168,7 @@ const AvailabilityPage = ({ profile, eventType, ...restProps }: Props) => {
diff --git a/packages/features/calendars/DatePicker.tsx b/packages/features/calendars/DatePicker.tsx index 28563fc3a5..1f7c87f49b 100644 --- a/packages/features/calendars/DatePicker.tsx +++ b/packages/features/calendars/DatePicker.tsx @@ -198,36 +198,41 @@ const DatePicker = ({ return (
-
- +
+ {browsingDate ? ( <> - {month}{" "} - {browsingDate.format("YYYY")} + {month}{" "} + {browsingDate.format("YYYY")} ) : ( )}
- - +
+
diff --git a/packages/ui/components/form/toggleGroup/ToggleGroup.tsx b/packages/ui/components/form/toggleGroup/ToggleGroup.tsx index f7ef07737c..ec795e87b5 100644 --- a/packages/ui/components/form/toggleGroup/ToggleGroup.tsx +++ b/packages/ui/components/form/toggleGroup/ToggleGroup.tsx @@ -25,7 +25,7 @@ export const ToggleGroup = ({ options, onValueChange, isFullWidth, ...props }: T {...props} onValueChange={setValue} className={classNames( - "dark:border-darkgray-200 relative inline-flex rounded-md border border-gray-200 p-1", + "dark:border-darkgray-200 min-h-9 dark:bg-darkgray-50 relative inline-flex gap-0.5 rounded-md border border-gray-200 p-1", props.className, isFullWidth && "w-full" )}> @@ -41,10 +41,10 @@ export const ToggleGroup = ({ options, onValueChange, isFullWidth, ...props }: T key={option.value} value={option.value} className={classNames( - "relative rounded-[4px] px-3 py-1 text-sm", + "relative rounded-[4px] px-3 py-1 text-sm leading-tight", option.disabled ? "dark:text-darkgray-900 text-gray-400 hover:cursor-not-allowed" - : "dark:text-darkgray-800 [&[aria-checked='false']]:hover:font-medium", + : "dark:text-darkgray-800 dark:[&[aria-checked='false']]:hover:bg-darkgray-100 [&[aria-checked='false']]:hover:bg-gray-100", isFullWidth && "w-full" )} ref={(node) => {