Open raazatul7 opened 1 year ago
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-confirmation-code-input@1.0.4 for the project I'm working on.
react-native-confirmation-code-input@1.0.4
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-confirmation-code-input/components/ConfirmationCodeInput.js b/node_modules/react-native-confirmation-code-input/components/ConfirmationCodeInput.js index 239c85a..a76a0d5 100644 --- a/node_modules/react-native-confirmation-code-input/components/ConfirmationCodeInput.js +++ b/node_modules/react-native-confirmation-code-input/components/ConfirmationCodeInput.js @@ -1,10 +1,15 @@ import React, {Component} from 'react'; import PropTypes from 'prop-types'; -import { View, TextInput, StyleSheet, Dimensions, ViewPropTypes } from 'react-native'; +import { View, TextInput, StyleSheet } from 'react-native'; import _ from 'lodash'; +import { + ViewPropTypes, + TextInputPropTypes, +} from "deprecated-react-native-prop-types"; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44) const viewPropTypes = ViewPropTypes || View.propTypes; +const textInputPropTypes = TextInputPropTypes || TextInput.propTypes; export default class ConfirmationCodeInput extends Component { static propTypes = { @@ -19,7 +24,7 @@ export default class ConfirmationCodeInput extends Component { inactiveColor: PropTypes.string, ignoreCase: PropTypes.bool, autoFocus: PropTypes.bool, - codeInputStyle: TextInput.propTypes.style, + codeInputStyle: textInputPropTypes.style, containerStyle: viewPropTypes.style, onFulfill: PropTypes.func, };
This issue body was partially generated by patch-package.
@raazatul7
Without this issue and with better maintainability, you can utilize a fork: https://github.com/retyui/react-native-confirmation-code-field
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-native-confirmation-code-input@1.0.4
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.