Files
web/apps/scandic-web/components/GuestsRoomsPicker/Counter/index.tsx
Anton Gunnarsson 75a377b59e Merged in chore/sw-3145-move-body (pull request #2505)
chore(SW-3145): Move Body component to design-system

* Move Body component to design-system


Approved-by: Joakim Jäderberg
2025-07-03 08:04:36 +00:00

51 lines
1.3 KiB
TypeScript

"use client"
import Body from "@scandic-hotels/design-system/Body"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import Button from "@/components/TempDesignSystem/Button"
import styles from "./counter.module.css"
import type { CounterProps } from "@/types/components/bookingWidget/guestsRoomsPicker"
export default function Counter({
count,
handleOnIncrease,
handleOnDecrease,
disableIncrease,
disableDecrease,
}: CounterProps) {
return (
<div className={styles.counterContainer}>
<Button
className={styles.counterBtn}
intent="inverted"
onClick={handleOnDecrease}
size="small"
theme="base"
variant="icon"
wrapping={true}
disabled={disableDecrease}
>
<MaterialIcon icon="remove" color="CurrentColor" />
</Button>
<Body color="baseTextHighContrast" textAlign="center">
{count}
</Body>
<Button
className={styles.counterBtn}
onClick={handleOnIncrease}
intent="inverted"
variant="icon"
theme="base"
wrapping={true}
size="small"
disabled={disableIncrease}
>
<MaterialIcon icon="add" color="CurrentColor" />
</Button>
</div>
)
}