Merged in SW-3270-move-interactive-map-to-design-system-or-booking-flow (pull request #2681)
SW-3270 move interactive map to design system or booking flow * wip * wip * merge * wip * add support for locales in design-system * add story for HotelCard * setup alias * . * remove tracking from design-system for hotelcard * pass isUserLoggedIn * export design-system-new-deprecated.css from design-system * Add HotelMarkerByType to Storybook * Add interactive map to Storybook * fix reactintl in vitest * rename env variables * . * fix background colors * add storybook stories for <Link /> * merge * fix tracking for when clicking 'See rooms' in InteractiveMap * Merge branch 'master' of bitbucket.org:scandic-swap/web into SW-3270-move-interactive-map-to-design-system-or-booking-flow * remove deprecated comment Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
.voucherCard {
|
||||
padding: var(--Spacing-x-one-and-half);
|
||||
background-color: var(--Base-Surface-Secondary-light-Normal);
|
||||
border-radius: var(--Corner-radius-md);
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.voucherRow,
|
||||
.voucher {
|
||||
display: flex;
|
||||
gap: var(--Spacing-x-half);
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.voucher {
|
||||
justify-content: end;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import { useIntl } from 'react-intl'
|
||||
|
||||
import { CurrencyEnum } from '@scandic-hotels/common/constants/currency'
|
||||
import Caption from '@scandic-hotels/design-system/Caption'
|
||||
import Subtitle from '@scandic-hotels/design-system/Subtitle'
|
||||
|
||||
import styles from './hotelVoucherCard.module.css'
|
||||
|
||||
import type { ProductTypeVoucher } from '@scandic-hotels/trpc/types/availability'
|
||||
|
||||
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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user