Custom and reusable components for react-native
npm install react-native-reusable-custom-components
OR
yarn add react-native-reusable-custom-components
- CustomHeader
- CustomButton
- CustomLoader
- iPhoneXHelper
- Scalability Functions
- Helper Funcions
- Custom OTP TextInput
- CustomModal
import { CustomHeader } from "react-native-reusable-custom-components"
<CustomHeader
middleText='Home'
backButton
/>
import { CustomButton, } from "react-native-reusable-custom-components"
<CustomButton
title='Next'
onPress={() => console.log("Pressed")}
/>
import { CustomLoader } from "react-native-reusable-custom-components"
<CustomLoader loading />
import { iPhoneHelp, } from "react-native-reusable-custom-components"
<View
style={{
marginBottom: iPhoneHelp.isIphoneX() ? 20 : 0
}}
/>
import { scale, verticalScale, moderateScale } from "react-native-reusable-custom-components"
<View
style={{
marginHorizontal: moderateScale(15),
marginVertical: verticalScale(20),
padding: scale(3)
}}
/>
import { HelperFunction, } from "react-native-reusable-custom-components"
const checkValidation = async () => {
var email = "[email protected]"
var isValidmail = await HelperFunction.isValidEmail(email);
console.log("isValidmail-->", isValidmail);
var password = "Test123@"
var validPassword = await HelperFunction.isValidPassword(password);
console.log("validPassword-->", validPassword);
}
import { OTPTextInput, } from "react-native-reusable-custom-components"
<OTPTextInput
otpCount={4}
onCodeUpdate={(code) => {
console.log("Code is--->", code)
}}
/>
import {CustomModal,CustomButton } from "react-native-reusable-custom-components"
const [visible, setVisible] = useState(false)
<CustomButton
title='Next'
onPress={() => setVisible(true)}
/>
<CustomModal
visible={visible}
onRequestClose={() => setVisible(false)}
/>
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT