We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using typescript in my project. So I decided to share my type definition file for anyone interested:
//types.d.ts declare module 'react-native-smooth-pincode-input'{ import { ReactElement, Component } from 'react'; import { StyleProp, ViewStyle,TextStyle,TextInputProps } from 'react-native'; type SmoothPinCodeInputProps = { value?: string; codeLength?: number; cellSize?: number; cellSpacing?: number; placeholder?: string | ReactElement; mask?: string | ReactElement; maskDelay?: number; password?: boolean; autoFocus?: boolean; restrictToNumbers?: boolean; containerStyle?: StyleProp<ViewStyle>; cellStyle?: StyleProp<ViewStyle>; cellStyleFocused?: StyleProp<ViewStyle>; cellStyleFilled?: StyleProp<ViewStyle>; textStyle?: StyleProp<TextStyle>; textStyleFocused?: StyleProp<TextStyle>; animated?: boolean; animationFocused?: string | any; onFulfill?: (value:string)=>void; onChangeText?: TextInputProps['onChangeText']; onBackspace?: ()=>void; onTextChange?: TextInputProps['onChangeText']; testID?: any; onFocus?: TextInputProps['onFocus'], onBlur?: TextInputProps['onBlur'], keyboardType?: string; editable?: boolean; inputProps?: TextInputProps; } type SmoothInputSate = { maskDelay: boolean, focused: boolean, } export default class SmoothPinCodeInput extends Component<SmoothPinCodeInputProps, SmoothInputSate> {} } }
EDITED: Forgot to set props as optional
The text was updated successfully, but these errors were encountered:
Thanks a lot made. It really helped. It's people like you who make it easier for other developers. Thanks again.
Sorry, something went wrong.
@harshitsinghai77 @tiagobnobrega
Thanks for typings and you can also use better implementation with TS by default: https://github.com/retyui/react-native-confirmation-code-field
No branches or pull requests
I'm using typescript in my project. So I decided to share my type definition file for anyone interested:
EDITED: Forgot to set props as optional
The text was updated successfully, but these errors were encountered: