Files
web/packages/booking-flow/lib/components/PriceDetailsModal/PriceDetailsTable/Row/Bold.tsx
Bianca Widstam bba4e24569 Merged in fix/SW-3198-prices-select-rate (pull request #2763)
fix(SW-3198): fix striketrhough/regular prices, the same in enter details as select rate

* fix(SW-3198): fix striketrhough/regular prices, the same in enter details as select rate

* fix(SW-3198): remove additonalcost if calculating cost per room

* fix(SW-3198): include bookingcode in specialrate

* fix(SW-3198): remove console log

* fix(SW-3198): add or operator

* fix(SW-3198): capture total return value

* fix(SW-3198): rename and move function


Approved-by: Joakim Jäderberg
Approved-by: Hrishikesh Vaipurkar
2025-09-05 14:02:47 +00:00

44 lines
1.1 KiB
TypeScript

import { cx } from "class-variance-authority"
import { Typography } from "@scandic-hotels/design-system/Typography"
import styles from "./row.module.css"
interface RowProps {
label: string
value: string
regularValue?: string
isDiscounted?: boolean
}
export default function BoldRow({
label,
value,
regularValue,
isDiscounted = false,
}: RowProps) {
return (
<tr className={styles.row}>
<td>
<Typography variant="Body/Supporting text (caption)/smBold">
<span>{label}</span>
</Typography>
</td>
<td className={styles.price}>
{isDiscounted && regularValue ? (
<Typography variant="Body/Supporting text (caption)/smRegular">
<p>
<s className={styles.strikeThroughRate}>{regularValue}</s>
</p>
</Typography>
) : null}
<Typography variant="Body/Supporting text (caption)/smBold">
<span className={cx({ [styles.discounted]: isDiscounted })}>
{value}
</span>
</Typography>
</td>
</tr>
)
}