fix(SW-1143): Added loading/skeleton to select hotel
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
.card {
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
border-radius: var(--Corner-radius-Large);
|
||||
border: 1px solid var(--Base-Border-Subtle);
|
||||
position: relative;
|
||||
height: 100%;
|
||||
justify-content: space-between;
|
||||
min-height: 200px;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.imageContainer {
|
||||
aspect-ratio: 16/9;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.priceVariants {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x1);
|
||||
padding: var(--Spacing-x2);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
gap: var(--Spacing-x1);
|
||||
padding: var(--Spacing-x2);
|
||||
}
|
||||
|
||||
.text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (min-width: 1367px) {
|
||||
.content {
|
||||
padding: var(--Spacing-x2) 0 var(--Spacing-x2) var(--Spacing-x2);
|
||||
}
|
||||
|
||||
.text {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.card {
|
||||
flex-direction: row;
|
||||
}
|
||||
.imageContainer {
|
||||
width: 315px;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
33
components/HotelReservation/HotelCard/HotelCardSkeleton.tsx
Normal file
33
components/HotelReservation/HotelCard/HotelCardSkeleton.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import SkeletonShimmer from "@/components/SkeletonShimmer"
|
||||
|
||||
import styles from "./HotelCardSkeleton.module.css"
|
||||
|
||||
export function HotelCardSkeleton() {
|
||||
return (
|
||||
<article className={styles.card}>
|
||||
{/* image container */}
|
||||
<div className={styles.imageContainer}>
|
||||
<SkeletonShimmer width={"100%"} height="100%" />
|
||||
</div>
|
||||
|
||||
<div className={styles.content}>
|
||||
<SkeletonShimmer height={"65px"} />
|
||||
<div className={styles.text}>
|
||||
<SkeletonShimmer height={"20px"} />
|
||||
<SkeletonShimmer height={"20px"} />
|
||||
<SkeletonShimmer height={"20px"} />
|
||||
<SkeletonShimmer height={"20px"} />
|
||||
</div>
|
||||
<SkeletonShimmer height={"56px"} />
|
||||
<SkeletonShimmer height={"52px"} />
|
||||
</div>
|
||||
|
||||
<div className={styles.priceVariants}>
|
||||
{/* price variants */}
|
||||
{Array.from({ length: 2 }).map((_, index) => (
|
||||
<SkeletonShimmer key={index} height={"100px"} />
|
||||
))}
|
||||
</div>
|
||||
</article>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user