42 lines
1.0 KiB
TypeScript
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>
|
|
)
|
|
}
|