feat(SW-350): Update design for booking widget
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -8,9 +8,13 @@ export type BookingWidgetSchema = z.output<typeof bookingWidgetSchema>
|
||||
|
||||
export type BookingWidgetType = "default" | "full"
|
||||
|
||||
export interface BookingWidgetProps {
|
||||
type?: BookingWidgetType
|
||||
}
|
||||
|
||||
export interface BookingWidgetClientProps {
|
||||
locations: Locations
|
||||
type: BookingWidgetType
|
||||
type?: BookingWidgetType
|
||||
}
|
||||
|
||||
export interface BookingWidgetToggleButtonProps {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user