Files
web/packages/booking-flow/lib/components/BookingWidget/GuestsRoomsPicker/Counter/index.tsx
Anton Gunnarsson c53e6ef187 Merged in chore/move-use-scroll-to-top (pull request #2705)
chore: Move useScrollToTop to common package

* Move useScrollToTop to common package


Approved-by: Joakim Jäderberg
2025-08-26 11:48:54 +00:00

50 lines
1.2 KiB
TypeScript

"use client"
import { IconButton } from "@scandic-hotels/design-system/IconButton"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import { Typography } from "@scandic-hotels/design-system/Typography"
import styles from "./counter.module.css"
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>
)
}