From f4866d5921f30761cdd816c3b9f9fba5dede9321 Mon Sep 17 00:00:00 2001 From: Damian Ricobelli Date: Tue, 5 Mar 2024 17:07:36 -0300 Subject: [PATCH] chore: add disabled prop --- apps/www/registry/default/ui/otp-input.tsx | 3 ++- apps/www/registry/new-york/ui/otp-input.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/www/registry/default/ui/otp-input.tsx b/apps/www/registry/default/ui/otp-input.tsx index de4a98ef690..921eba2cc97 100644 --- a/apps/www/registry/default/ui/otp-input.tsx +++ b/apps/www/registry/default/ui/otp-input.tsx @@ -10,7 +10,7 @@ type AllowedInputTypes = "password" | "text" | "number" | "tel" interface OTPInputProps extends Pick< React.InputHTMLAttributes, - "pattern" | "autoFocus" | "id" | "name" + "pattern" | "autoFocus" | "id" | "name" | "disabled" > { /** Value of the OTP input */ value?: string @@ -238,6 +238,7 @@ export const OTPInput = ({ autoComplete="one-time-code" maxLength={1} size={1} + disabled={rest.disabled} className={cn( "text-center font-bold", activeInput === i && "z-10", diff --git a/apps/www/registry/new-york/ui/otp-input.tsx b/apps/www/registry/new-york/ui/otp-input.tsx index 2d73b991845..543c2892aa3 100644 --- a/apps/www/registry/new-york/ui/otp-input.tsx +++ b/apps/www/registry/new-york/ui/otp-input.tsx @@ -10,7 +10,7 @@ type AllowedInputTypes = "password" | "text" | "number" | "tel" interface OTPInputProps extends Pick< React.InputHTMLAttributes, - "pattern" | "autoFocus" | "id" | "name" + "pattern" | "autoFocus" | "id" | "name" | "disabled" > { /** Value of the OTP input */ value?: string @@ -238,6 +238,7 @@ export const OTPInput = ({ autoComplete="one-time-code" maxLength={1} size={1} + disabled={rest.disabled} className={cn( "text-center font-bold", activeInput === i && "z-10",