feat:SW-1422 Updated Tablet mode

This commit is contained in:
Hrishikesh Vaipurkar
2025-02-03 23:34:04 +01:00
parent 63f456da5a
commit 304fc7f1c9
7 changed files with 185 additions and 125 deletions

View File

@@ -0,0 +1,25 @@
import { useFormContext } from "react-hook-form"
import { useIntl } from "react-intl"
import Input from "@/components/TempDesignSystem/Form/Input"
import type { BookingWidgetSchema } from "@/types/components/bookingWidget"
export default function TabletCodeInput({
updateValue,
defaultValue,
}: {
updateValue: (val: string) => void
defaultValue?: string
}) {
const intl = useIntl()
const { register } = useFormContext<BookingWidgetSchema>()
return (
<Input
label={intl.formatMessage({ id: "Add code" })}
{...register("bookingCode.value", {
onChange: (e) => updateValue(e.target.value),
})}
/>
)
}