Files
web/packages/booking-flow/lib/components/BookingWidget/GuestsRoomsPicker/Counter/index.tsx
Bianca Widstam aa7a7a8c2f Merged in fix/SW-2790-room-picker-buttons (pull request #2667)
fix(SW-2790): update ui room picker buttons

* fix(SW-2790): update ui room picker buttons

* fix(SW-2790


Approved-by: Matilda Landström
2025-08-20 06:38:18 +00:00

50 lines
1.2 KiB
TypeScript

"use client"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import styles from "./counter.module.css"
import { IconButton } from "@scandic-hotels/design-system/IconButton"
import { Typography } from "@scandic-hotels/design-system/Typography"
type CounterProps = {
count: number
handleOnIncrease: () => void
handleOnDecrease: () => void
disableIncrease: boolean
disableDecrease: boolean
}
export default function Counter({
count,
handleOnIncrease,
handleOnDecrease,
disableIncrease,
disableDecrease,
}: CounterProps) {
return (
<div className={styles.counterContainer}>
<IconButton
className={styles.counterBtn}
onClick={handleOnDecrease}
theme="Inverted"
style="Elevated"
isDisabled={disableDecrease}
>
<MaterialIcon icon="remove" color="CurrentColor" />
</IconButton>
<Typography variant="Body/Paragraph/mdRegular">
<p>{count}</p>
</Typography>
<IconButton
className={styles.counterBtn}
onClick={handleOnIncrease}
theme="Inverted"
style="Elevated"
isDisabled={disableIncrease}
>
<MaterialIcon icon="add" color="CurrentColor" />
</IconButton>
</div>
)
}