chore: Cleanup booking widget with types and other minor issues
This commit is contained in:
@@ -12,14 +12,14 @@ import ChildSelector from "../ChildSelector"
|
||||
import styles from "../guests-rooms-picker.module.css"
|
||||
|
||||
import { ChildBedMapEnum } from "@/types/components/bookingWidget/enums"
|
||||
import type { TGuestsRoom } from "@/types/components/bookingWidget/guestsRoomsPicker"
|
||||
import type { GuestsRoom } from "@/types/components/bookingWidget/guestsRoomsPicker"
|
||||
|
||||
export function GuestsRoom({
|
||||
room,
|
||||
index,
|
||||
onRemove,
|
||||
}: {
|
||||
room: TGuestsRoom
|
||||
room: GuestsRoom
|
||||
index: number
|
||||
onRemove: (index: number) => void
|
||||
}) {
|
||||
@@ -54,22 +54,18 @@ export function GuestsRoom({
|
||||
childrenInAdultsBed={childrenInAdultsBed}
|
||||
/>
|
||||
{index !== 0 && (
|
||||
<div className={styles.roomActions}>
|
||||
<Button
|
||||
intent="text"
|
||||
variant="icon"
|
||||
wrapping
|
||||
theme="secondaryLight"
|
||||
onPress={() => onRemove(index)}
|
||||
size="small"
|
||||
className={styles.roomActionsButton}
|
||||
>
|
||||
<MaterialIcon icon="delete" color="CurrentColor" />
|
||||
<span className={styles.roomActionsLabel}>
|
||||
{intl.formatMessage({ id: "Remove room" })}
|
||||
</span>
|
||||
</Button>
|
||||
</div>
|
||||
<Button
|
||||
intent="text"
|
||||
variant="icon"
|
||||
wrapping
|
||||
theme="secondaryLight"
|
||||
onPress={() => onRemove(index)}
|
||||
size="small"
|
||||
className={styles.roomActionsButton}
|
||||
>
|
||||
<MaterialIcon icon="delete" color="CurrentColor" />
|
||||
{intl.formatMessage({ id: "Remove room" })}
|
||||
</Button>
|
||||
)}
|
||||
</section>
|
||||
<Divider color="primaryLightSubtle" />
|
||||
|
||||
Reference in New Issue
Block a user