Files
web/packages/design-system/lib/components/HotelCard/HotelVoucherCard/index.tsx
Joakim Jäderberg aafad9781f Merged in feat/lokalise-rebuild (pull request #2993)
Feat/lokalise rebuild

* chore(lokalise): update translation ids

* chore(lokalise): easier to switch between projects

* chore(lokalise): update translation ids

* .

* .

* .

* .

* .

* .

* chore(lokalise): update translation ids

* chore(lokalise): update translation ids

* .

* .

* .

* chore(lokalise): update translation ids

* chore(lokalise): update translation ids

* .

* .

* chore(lokalise): update translation ids

* chore(lokalise): update translation ids

* chore(lokalise): new translations

* merge

* switch to errors for missing id's

* merge

* sync translations


Approved-by: Linus Flood
2025-10-22 11:00:03 +00:00

48 lines
1.2 KiB
TypeScript

import { useIntl } from 'react-intl'
import Caption from '../../Caption'
import Subtitle from '../../Subtitle'
import styles from './hotelVoucherCard.module.css'
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}>
<Subtitle type="two" color="uiTextHighContrast">
{productTypeVoucher.numberOfVouchers}
</Subtitle>
<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>
)
}