rn-custom-login
v0.0.6
Published
Test
Readme
React Native My Custom Login Page
- Custom Login Page
Installation
npm i rn-custom-loginor
yarn add rn-custom-loginExample
Please check the example
import React from 'react';
import {
Alert,
Dimensions,
SafeAreaView,
View,
Text
} from 'react-native';
import LoginPage from 'rn-custom-login';
const App = () => {
const [email, onEmail] = React.useState('');
const [pswd, onPswd] = React.useState('');
return (
<SafeAreaView style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<LoginPage
emailOnChange={(text: string) => onEmail(text)}
pswdOnChange={(text: string) => onPswd(text)}
emailInput={email}
pswdInput={pswd}
emailPlaceholder={'Enter Email'}
pswdPlaceholder={'Enter Password'}
width={Dimensions.get('window').width - 20}
height={Dimensions.get('window').height / 12}
borderColor={'grey'}
emailSecureTextEntry={false}
pswdSecureTextEntry={true}
pageTitle={'Hello Test App'}
//loginTitle={'Login Screen'}
buttonTitle= {'My Button'}
btnBgColor = {'#3a1bc2'}
buttonOnpress={() => Alert.alert(`Email: ${email} & Password: ${pswd}`)}
/>
</SafeAreaView>
);
}
export default App;Props
| Props | Type | Description | Default |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| height | number | The height of Button.
| Width | number | The Width of Button.
Author
Made with ❤️ by Venkat
