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