Files
web/packages/design-system/lib/components/HotelCard/HotelVoucherCard/index.tsx
Bianca Widstam 1b9273136a Merged in chore/BOOK-701-replace-subtitle-component (pull request #3398)
chore(BOOK-701): replace subtitle with typography

* chore(BOOK-701): replace subtitle with typography

* chore(BOOK-701): align center

* chore(BOOK-701): change token

* chore(BOOK-701): change text color

* fix(BOOK-704): revert pricechange dialog changes

* chore(BOOK-701): remove subtitle from package.json


Approved-by: Matilda Landström
2026-01-12 07:40:30 +00:00

48 lines
1.2 KiB
TypeScript

import { useIntl } from "react-intl"
import Caption from "../../Caption"
import styles from "./hotelVoucherCard.module.css"
import { Typography } from "../../Typography"
type ProductTypeVoucher = {
numberOfVouchers: number
}
export default function HotelVoucherCard({
productTypeVoucher,
}: {
productTypeVoucher: ProductTypeVoucher
}) {
const intl = useIntl()
return (
<div className={styles.voucherCard}>
<div className={styles.voucherRow}>
<Caption>
{intl.formatMessage({
id: "common.from",
defaultMessage: "From",
})}
</Caption>
<div className={styles.voucher}>
<Typography variant="Title/Subtitle/md">
<p>{productTypeVoucher.numberOfVouchers}</p>
</Typography>
<Caption color="uiTextHighContrast" className={styles.currency}>
{intl.formatMessage(
{
id: "price.numberOfVouchers",
defaultMessage:
"{numberOfVouchers, plural, one {Voucher} other {Vouchers}}",
},
{
numberOfVouchers: productTypeVoucher.numberOfVouchers,
}
)}
</Caption>
</div>
</div>
</div>
)
}