Files
web/packages/booking-flow/lib/components/PriceDetailsModal/PriceDetailsTable/Row/Bold.tsx
Anton Gunnarsson f7ef58eafa Merged in feat/sw-2874-move-select-rate (pull request #2750)
Approved-by: Joakim Jäderberg
2025-09-03 08:30:05 +00:00

42 lines
1.0 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">
<s className={styles.strikeThroughRate}>{regularValue}</s>
</Typography>
) : null}
<Typography variant="Body/Supporting text (caption)/smBold">
<span className={cx({ [styles.discounted]: isDiscounted })}>
{value}
</span>
</Typography>
</td>
</tr>
)
}