Socket
Socket
Sign inDemoInstall

react-native-reusable-custom-components

Package Overview
Dependencies
516
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-reusable-custom-components

Custom and reusable components for react-native


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-native-reusable-custom-components

Custom and reusable components for react-native

Installation

npm install react-native-reusable-custom-components
OR
yarn add react-native-reusable-custom-components

Features

  1. CustomHeader
  2. CustomButton
  3. CustomLoader
  4. iPhoneXHelper
  5. Scalability Functions
  6. Helper Funcions
  7. Custom OTP TextInput
  8. CustomModal

Usage

1. CustomHeader

import { CustomHeader } from "react-native-reusable-custom-components"

 <CustomHeader
    middleText='Home'
    backButton
 />

2. CustomButton

import {  CustomButton, } from "react-native-reusable-custom-components"

 <CustomButton
    title='Next'
    onPress={() => console.log("Pressed")}
 />

3. CustomLoader

import { CustomLoader } from "react-native-reusable-custom-components"

 <CustomLoader loading />

4. iPhoneXHelper

import { iPhoneHelp, } from "react-native-reusable-custom-components"

  <View
    style={{
       marginBottom: iPhoneHelp.isIphoneX() ? 20 : 0
    }}
    />

5. Scalability Functions

import { scale, verticalScale, moderateScale } from "react-native-reusable-custom-components"

  <View
    style={{
          marginHorizontal: moderateScale(15),
          marginVertical: verticalScale(20),
          padding: scale(3)
    }}
    />

6. Helper Functions

import { HelperFunction, } from "react-native-reusable-custom-components"

  const checkValidation = async () => {
    var email = "test@gmail.com"
    var isValidmail = await HelperFunction.isValidEmail(email);
    console.log("isValidmail-->", isValidmail);

    var password = "Test123@"
    var validPassword = await HelperFunction.isValidPassword(password);
    console.log("validPassword-->", validPassword);
  }

7. Custom OTP TextInput

import { OTPTextInput, } from "react-native-reusable-custom-components"

<OTPTextInput
    otpCount={4}
    onCodeUpdate={(code) => {
     console.log("Code is--->", code)
    }}
/>

8. CustomModal

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)}
/>

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

FAQs

Last updated on 19 May 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc