chore(BOOK-739): replace caption with typography * chore(BOOK-739): replace caption with typography * chore(BOOK-739): refactor div * chore(BOOK-739): refactor badge * chore(BOOK-739): remove span * chore(BOOK-739): skeleton update * chore(BOOK-739): update * chore(BOOK-739): update reward * chore(BOOK-739): update voucher currency Approved-by: Erik Tiekstra
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import { useIntl } from "react-intl"
|
|
|
|
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}>
|
|
<Typography variant="Body/Supporting text (caption)/smBold">
|
|
<p>
|
|
{intl.formatMessage({
|
|
id: "common.from",
|
|
defaultMessage: "From",
|
|
})}
|
|
</p>
|
|
</Typography>
|
|
<div className={styles.voucher}>
|
|
<Typography variant="Title/Subtitle/md">
|
|
<p>{productTypeVoucher.numberOfVouchers}</p>
|
|
</Typography>
|
|
<Typography variant="Body/Supporting text (caption)/smRegular">
|
|
<p>
|
|
{intl.formatMessage(
|
|
{
|
|
id: "price.numberOfVouchers",
|
|
defaultMessage:
|
|
"{numberOfVouchers, plural, one {Voucher} other {Vouchers}}",
|
|
},
|
|
{
|
|
numberOfVouchers: productTypeVoucher.numberOfVouchers,
|
|
}
|
|
)}
|
|
</p>
|
|
</Typography>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|