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
48 lines
1.2 KiB
TypeScript
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>
|
|
)
|
|
}
|