Skip to content

Commit 1c8bbbf

Browse files
committed
vercel error fix
1 parent 827b060 commit 1c8bbbf

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/components/ui/input-otp/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ export interface OTPInputProps {
7373
onFocus?: () => void;
7474
}
7575

76+
// Helper function to map our keyboard types to React Native's KeyboardTypeOptions
77+
const keyboardTypeMap: Record<string, TextInputProps['keyboardType']> = {
78+
numeric: 'numeric',
79+
default: 'default',
80+
'email-address': 'email-address',
81+
'phone-pad': 'phone-pad',
82+
};
83+
7684
type OTPInputRef = {
7785
focus: () => void;
7886
blur: () => void;
@@ -762,7 +770,7 @@ export const OTPInput = forwardRef<OTPInputRef, OTPInputProps>(
762770
onFocus={() => handleFocus(displayIndex)}
763771
onBlur={handleBlur}
764772
maxLength={1}
765-
keyboardType={keyboard}
773+
keyboardType={keyboardTypeMap[keyboard]}
766774
secureTextEntry={false}
767775
editable={!disabled}
768776
selectTextOnFocus={true}

docs/pages/components/input-otp.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export function VerificationScreen() {
257257
separator?: boolean | React.ReactNode;
258258
size?: 'sm' | 'md' | 'lg';
259259
mask?: boolean;
260-
keyboard?: 'default' | 'numeric';
260+
keyboard?: 'default' | 'numeric' | 'email-address' | 'phone-pad';
261261
error?: boolean | string;
262262
className?: string;
263263
mode?: 'light' | 'dark';

0 commit comments

Comments
 (0)