mirror of
https://github.com/valitydev/checkout.git
synced 2024-11-06 10:35:20 +00:00
This commit is contained in:
parent
d115f2fbac
commit
9e8645aa5e
@ -24,6 +24,8 @@ const getCustomInput = (props: CardHolderProps, fieldProps: WrappedFieldProps) =
|
||||
mark={true}
|
||||
id="card-holder-input"
|
||||
onInput={formatCardHolder}
|
||||
autocomplete="cc-name"
|
||||
spellcheck={false}
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -37,6 +37,7 @@ const getCardNumberInput = (props: CardNumberProps, fieldProps: WrappedFieldProp
|
||||
type="tel"
|
||||
id="card-number-input"
|
||||
onInput={formatCardNumber}
|
||||
autocomplete="cc-number"
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -25,6 +25,7 @@ const getCustomInput = (props: ExpireDateProps, fieldProps: WrappedFieldProps) =
|
||||
type="tel"
|
||||
id="expire-date-input"
|
||||
onInput={formatExpiry}
|
||||
autocomplete="cc-exp"
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -28,6 +28,7 @@ const getCustomInput = (props: SecureCodeProps, fieldProps: WrappedFieldProps) =
|
||||
mark={true}
|
||||
type={props.obscureCardCvv ? 'password' : 'tel'}
|
||||
id="secure-code-input"
|
||||
autocomplete="cc-csc"
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -25,6 +25,7 @@ const getCustomInput = (props: EmailDefProps, fieldProps: WrappedFieldProps) =>
|
||||
type="email"
|
||||
id="email-input"
|
||||
onInput={formatEmail}
|
||||
autocomplete="email"
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -26,6 +26,7 @@ const getCustomInput = (props: PhoneProps, fieldProps: WrappedFieldProps) => (
|
||||
id="phone-input"
|
||||
onInput={formatPhoneNumber}
|
||||
onFocus={formatPhoneNumber}
|
||||
autocomplete="tel"
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -86,6 +86,8 @@ export interface CustomProps {
|
||||
type?: 'text' | 'number' | 'value' | 'tel' | 'email' | 'password';
|
||||
id?: string;
|
||||
onInput?: React.FormEventHandler<HTMLInputElement>;
|
||||
autocomplete?: string;
|
||||
spellcheck?: boolean;
|
||||
}
|
||||
|
||||
type InputProps = WrappedFieldInputProps & WrappedFieldMetaProps & CustomProps;
|
||||
@ -104,6 +106,8 @@ export const Input: React.FC<InputProps> = (props) => (
|
||||
type={props.type}
|
||||
value={props.value}
|
||||
id={props.id}
|
||||
autoComplete={props.autocomplete}
|
||||
spellCheck={props.spellcheck}
|
||||
/>
|
||||
{props.mark && <Marks active={props.active} pristine={props.pristine} error={props.error} />}
|
||||
</InputWrapper>
|
||||
|
Loading…
Reference in New Issue
Block a user