Merged in feat/SW-1062-parking-page (pull request #1242)
Feat/SW-1062 parking page * feat(SW-1062): Added parking sub page Approved-by: Christian Andolf Approved-by: Fredrik Thorsson
This commit is contained in:
64
components/ParkingInformation/ParkingList/index.tsx
Normal file
64
components/ParkingInformation/ParkingList/index.tsx
Normal file
@@ -0,0 +1,64 @@
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
import styles from "./parkingList.module.css"
|
||||
|
||||
import type { ParkingListProps } from "@/types/components/hotelPage/sidepeek/parking"
|
||||
|
||||
export default async function ParkingList({
|
||||
numberOfChargingSpaces,
|
||||
canMakeReservation,
|
||||
numberOfParkingSpots,
|
||||
distanceToHotel,
|
||||
address,
|
||||
}: ParkingListProps) {
|
||||
const intl = await getIntl()
|
||||
|
||||
const canMakeReservationYesMsg = intl.formatMessage({
|
||||
id: "Parking can be reserved in advance: Yes",
|
||||
})
|
||||
const canMakeReservationNoMsg = intl.formatMessage({
|
||||
id: "Parking can be reserved in advance: No",
|
||||
})
|
||||
|
||||
return (
|
||||
<Body color="uiTextHighContrast" asChild>
|
||||
<ul className={styles.listStyling}>
|
||||
{numberOfChargingSpaces ? (
|
||||
<li>
|
||||
{intl.formatMessage(
|
||||
{ id: "Number of charging points for electric cars: {number}" },
|
||||
{ number: numberOfChargingSpaces }
|
||||
)}
|
||||
</li>
|
||||
) : null}
|
||||
<li>
|
||||
{canMakeReservation
|
||||
? canMakeReservationYesMsg
|
||||
: canMakeReservationNoMsg}
|
||||
</li>
|
||||
{numberOfParkingSpots ? (
|
||||
<li>
|
||||
{intl.formatMessage(
|
||||
{ id: "Number of parking spots: {number}" },
|
||||
{ number: numberOfParkingSpots }
|
||||
)}
|
||||
</li>
|
||||
) : null}
|
||||
{distanceToHotel ? (
|
||||
<li>
|
||||
{intl.formatMessage(
|
||||
{ id: "Distance to hotel: {distanceInM} m" },
|
||||
{ distanceInM: distanceToHotel }
|
||||
)}
|
||||
</li>
|
||||
) : null}
|
||||
{address ? (
|
||||
<li>
|
||||
{intl.formatMessage({ id: "Address: {address}" }, { address })}
|
||||
</li>
|
||||
) : null}
|
||||
</ul>
|
||||
</Body>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
.listStyling {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.listStyling > li::before {
|
||||
content: url("/_static/icons/heart.svg");
|
||||
position: relative;
|
||||
height: 8px;
|
||||
top: 3px;
|
||||
margin-right: var(--Spacing-x1);
|
||||
}
|
||||
Reference in New Issue
Block a user