diff --git a/components/BookingWidget/bookingWidget.module.css b/components/BookingWidget/bookingWidget.module.css index 0048f25de..c56e1e047 100644 --- a/components/BookingWidget/bookingWidget.module.css +++ b/components/BookingWidget/bookingWidget.module.css @@ -1,4 +1,4 @@ -@media screen and (max-width: 766px) { +@media screen and (max-width: 767px) { .container { background-color: var(--UI-Input-Controls-Surface-Normal); bottom: -100%; @@ -36,7 +36,7 @@ } } -@media screen and (min-width: 767px) { +@media screen and (min-width: 768px) { .container { display: block; box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.05); diff --git a/components/BookingWidget/index.tsx b/components/BookingWidget/index.tsx index 4b1115647..f7f220a0b 100644 --- a/components/BookingWidget/index.tsx +++ b/components/BookingWidget/index.tsx @@ -2,17 +2,13 @@ import { getLocations } from "@/lib/trpc/memoizedRequests" import BookingWidgetClient from "./Client" -import type { BookingWidgetType } from "@/types/components/bookingWidget" +import type { BookingWidgetProps } from "@/types/components/bookingWidget" export function preload() { void getLocations() } -export default async function BookingWidget({ - type, -}: { - type: BookingWidgetType -}) { +export default async function BookingWidget({ type }: BookingWidgetProps) { const locations = await getLocations() if (!locations || "error" in locations) { diff --git a/components/Forms/BookingWidget/FormContent/formContent.module.css b/components/Forms/BookingWidget/FormContent/formContent.module.css index d26036db2..952b9cad0 100644 --- a/components/Forms/BookingWidget/FormContent/formContent.module.css +++ b/components/Forms/BookingWidget/FormContent/formContent.module.css @@ -29,7 +29,7 @@ height: var(--Spacing-x3); } -@media screen and (max-width: 766px) { +@media screen and (max-width: 767px) { .input { display: grid; gap: var(--Spacing-x2); @@ -59,7 +59,7 @@ } } -@media screen and (min-width: 767px) { +@media screen and (min-width: 768px) { .input { display: flex; gap: var(--Spacing-x2); diff --git a/components/Forms/BookingWidget/form.module.css b/components/Forms/BookingWidget/form.module.css index 465ba56d6..c3d472d4e 100644 --- a/components/Forms/BookingWidget/form.module.css +++ b/components/Forms/BookingWidget/form.module.css @@ -12,7 +12,7 @@ width: 100%; } -@media screen and (max-width: 766px) { +@media screen and (max-width: 767px) { .form { align-self: flex-start; } @@ -24,7 +24,7 @@ } } -@media screen and (min-width: 767px) { +@media screen and (min-width: 768px) { .section { display: flex; padding: var(--Spacing-x1) var(--Spacing-x5); diff --git a/types/components/bookingWidget/index.ts b/types/components/bookingWidget/index.ts index 1e58e2af1..0f42a7d58 100644 --- a/types/components/bookingWidget/index.ts +++ b/types/components/bookingWidget/index.ts @@ -8,9 +8,13 @@ export type BookingWidgetSchema = z.output export type BookingWidgetType = "default" | "full" +export interface BookingWidgetProps { + type?: BookingWidgetType +} + export interface BookingWidgetClientProps { locations: Locations - type: BookingWidgetType + type?: BookingWidgetType } export interface BookingWidgetToggleButtonProps { diff --git a/types/components/form/bookingwidget.ts b/types/components/form/bookingwidget.ts index d37c16a9a..15c6a4a1e 100644 --- a/types/components/form/bookingwidget.ts +++ b/types/components/form/bookingwidget.ts @@ -1,8 +1,9 @@ +import type { BookingWidgetType } from "@/types/components/bookingWidget" import type { Location, Locations } from "@/types/trpc/routers/hotel/locations" export interface BookingWidgetFormProps { locations: Locations - type: "default" | "full" + type?: BookingWidgetType } export interface BookingWidgetFormContentProps {