feat(SW-914): add button
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
.wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--Spacing-x3);
|
||||||
|
}
|
||||||
@@ -1,5 +1,19 @@
|
|||||||
|
import Button from "@/components/TempDesignSystem/Button"
|
||||||
|
import Link from "@/components/TempDesignSystem/Link"
|
||||||
|
|
||||||
|
import styles from "./amenity.module.css"
|
||||||
|
|
||||||
import type { AmenityProps } from "@/types/components/hotelPage/sidepeek/amenity"
|
import type { AmenityProps } from "@/types/components/hotelPage/sidepeek/amenity"
|
||||||
|
|
||||||
export default function Amenity({ title }: AmenityProps) {
|
export default function Amenity({ name, buttonUrl }: AmenityProps) {
|
||||||
return <div>{title}</div>
|
return (
|
||||||
|
<div className={styles.wrapper}>
|
||||||
|
<div>{name}</div>
|
||||||
|
{buttonUrl && (
|
||||||
|
<Button theme="base" intent="primary" fullWidth asChild>
|
||||||
|
<Link href={buttonUrl}>{name}</Link>
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,14 +25,14 @@ export default async function AmenitiesSidepeek({
|
|||||||
<>
|
<>
|
||||||
<Accordion>
|
<Accordion>
|
||||||
{amenitiesList.map((amenity) => {
|
{amenitiesList.map((amenity) => {
|
||||||
const iconName = mapFacilityToIconName(amenity.id)
|
const name = mapFacilityToIconName(amenity.id)
|
||||||
return (
|
return (
|
||||||
<AccordionItem
|
<AccordionItem
|
||||||
key={amenity.name}
|
key={amenity.name}
|
||||||
title={amenity.name}
|
title={amenity.name}
|
||||||
icon={IconName[iconName]}
|
icon={IconName[name]}
|
||||||
>
|
>
|
||||||
<Amenity title={amenity.name} />
|
<Amenity name={amenity.name} buttonUrl="#" />
|
||||||
</AccordionItem>
|
</AccordionItem>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
export type AmenityProps = {
|
export type AmenityProps = {
|
||||||
title: string
|
name: string
|
||||||
|
buttonUrl?: string
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user