feat(SW-1012): add caption
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||||
|
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
|
|
||||||
|
import styles from "./openingHours.module.css"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Days,
|
Days,
|
||||||
type RestaurantBarOpeningHoursProps,
|
type RestaurantBarOpeningHoursProps,
|
||||||
@@ -9,6 +12,7 @@ import type { RestaurantOpeningHoursDay } from "@/types/hotel"
|
|||||||
|
|
||||||
export default async function OpeningHours({
|
export default async function OpeningHours({
|
||||||
openingHours,
|
openingHours,
|
||||||
|
alternateOpeningHours,
|
||||||
}: RestaurantBarOpeningHoursProps) {
|
}: RestaurantBarOpeningHoursProps) {
|
||||||
const intl = await getIntl()
|
const intl = await getIntl()
|
||||||
|
|
||||||
@@ -52,7 +56,7 @@ export default async function OpeningHours({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className={styles.wrapper}>
|
||||||
<Body textTransform="bold">{openingHours.name}</Body>
|
<Body textTransform="bold">{openingHours.name}</Body>
|
||||||
{Object.entries(groupedOpeningHours).map(([time, days]) => {
|
{Object.entries(groupedOpeningHours).map(([time, days]) => {
|
||||||
return (
|
return (
|
||||||
@@ -61,6 +65,11 @@ export default async function OpeningHours({
|
|||||||
</Body>
|
</Body>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
{alternateOpeningHours?.name ? (
|
||||||
|
<Caption color="uiTextMediumContrast">
|
||||||
|
{alternateOpeningHours.name}
|
||||||
|
</Caption>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.wrapper {
|
||||||
|
display: grid;
|
||||||
|
gap: var(--Spacing-x-half);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user