Fix/linting * fix import issues and add lint check no-extraneous-dependencies * fix use type HotelType instead of string Approved-by: Anton Gunnarsson
39 lines
998 B
TypeScript
39 lines
998 B
TypeScript
import { useIntl } from 'react-intl'
|
|
|
|
import { CurrencyEnum } from '@scandic-hotels/common/constants/currency'
|
|
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({
|
|
defaultMessage: 'From',
|
|
})}
|
|
</Caption>
|
|
<div className={styles.voucher}>
|
|
<Subtitle type="two" color="uiTextHighContrast">
|
|
{productTypeVoucher.numberOfVouchers}
|
|
</Subtitle>
|
|
<Caption color="uiTextHighContrast" className={styles.currency}>
|
|
{CurrencyEnum.Voucher}
|
|
</Caption>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|