Skip to content

Commit 771e5c0

Browse files
committed
feat: breaking changes with new props
1 parent c8d52d2 commit 771e5c0

21 files changed

Lines changed: 48 additions & 44 deletions

README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import LoginScreen from "react-native-login-screen";
5757
<LoginScreen
5858
logoImageSource={require("./assets/logo-example.png")}
5959
onLoginPress={() => {}}
60-
onHaveAccountPress={() => {}}
60+
onSignupPress={() => {}}
6161
onEmailChange={(email: string) => {}}
6262
onPasswordChange={(password: string) => {}}
6363
/>
@@ -73,7 +73,7 @@ import LoginScreen, { SocialButton } from "react-native-login-screen";
7373
<LoginScreen
7474
logoImageSource={require("./assets/logo-example.png")}
7575
onLoginPress={() => {}}
76-
onHaveAccountPress={() => {}}
76+
onSignupPress={() => {}}
7777
onEmailChange={(email: string) => {}}
7878
onPasswordChange={(password: string) => {}}
7979
>
@@ -95,29 +95,30 @@ import LoginScreen, { SocialButton } from "react-native-login-screen";
9595

9696
### Fundamentals
9797

98-
| Property | Type | Default | Description |
99-
| ------------------ | :------: | :-------: | ------------------------------------------------------------------ |
100-
| onLoginPress | function | undefined | set your own function when the `login button` is pressed |
101-
| onHaveAccountPress | function | undefined | set your own function when the `have an account button` is pressed |
102-
| onEmailChange | function | undefined | set your own function when `email` textinput has a change |
103-
| onPasswordChange | function | undefined | set your own function when `password` textinput has a change |
104-
| logoImageSource | source | undefined | set your own logo |
98+
| Property | Type | Default | Description |
99+
| ---------------- | :------: | :-------: | ------------------------------------------------------------- |
100+
| onLoginPress | function | undefined | set your own function when the `login button` is pressed |
101+
| onSignupPress | function | undefined | set your own function when the `Create an account` is pressed |
102+
| onEmailChange | function | undefined | set your own function when `email` textinput has a change |
103+
| onPasswordChange | function | undefined | set your own function when `password` textinput has a change |
104+
| logoImageSource | source | undefined | set your own logo |
105105

106106
### Customizations (Optional)
107107

108-
| Property | Type | Default | Description |
109-
| ----------------------- | :--------: | :------------------------: | --------------------------------------------------- |
110-
| haveAccountText | string | "Already have an account?" | change the have account text |
111-
| disableDivider | boolean | false | disable the divider if you do not want to use it |
112-
| disableSocialButtons | boolean | false | disable the all social buttons |
113-
| style | ViewStyle | default | set/override the default style for the container |
114-
| dividerStyle | ViewStyle | default | set/override the default divider style |
115-
| logoImageStyle | ImageStyle | default | set/override the default image style |
116-
| textInputContainerStyle | ViewStyle | default | set/override the default text input container style |
117-
| loginButtonStyle | ViewStyle | default | set/override the default login button style |
118-
| loginTextStyle | TextStyle | default | set/override the default login text style |
119-
| haveAccountButtonStyle | ViewStyle | default | set/override the default have account button style |
120-
| haveAccountTextStyle | TextStyle | default | set/override the default have account text style |
108+
| Property | Type | Default | Description |
109+
| ----------------------- | :--------: | :-----------------: | --------------------------------------------------- |
110+
| signupText | string | "Create an account" | change the sign up text |
111+
| disableSignup | boolean | false | disable the signup if you do not want to use it |
112+
| disableDivider | boolean | false | disable the divider if you do not want to use it |
113+
| disableSocialButtons | boolean | false | disable the all social buttons |
114+
| style | ViewStyle | default | set/override the default style for the container |
115+
| dividerStyle | ViewStyle | default | set/override the default divider style |
116+
| logoImageStyle | ImageStyle | default | set/override the default image style |
117+
| textInputContainerStyle | ViewStyle | default | set/override the default text input container style |
118+
| loginButtonStyle | ViewStyle | default | set/override the default login button style |
119+
| loginTextStyle | TextStyle | default | set/override the default login text style |
120+
| signupStyle | ViewStyle | default | set/override the default signup button style |
121+
| signupTextStyle | TextStyle | default | set/override the default signup text style |
121122

122123
### Default Social Login Buttons (Optional)
123124

-30.5 MB
Binary file not shown.
-2.14 MB
Loading

example/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, {useState} from 'react';
22
import {View, StatusBar} from 'react-native';
3-
import {LoginScreen, SocialButton} from 'react-native-login-screen';
3+
import LoginScreen, {SocialButton} from './build/dist/index';
44

55
const App = () => {
66
const [username, setUsername] = useState(null);
@@ -13,7 +13,7 @@ const App = () => {
1313
<LoginScreen
1414
logoImageSource={require('./assets/logo-example.png')}
1515
onLoginPress={() => {}}
16-
onHaveAccountPress={() => {}}
16+
onSignupPress={() => {}}
1717
onEmailChange={(email: string) => {}}
1818
onPasswordChange={(password: string) => {}}
1919
/>

example/assets/fonts/Now-Black.otf

37.3 KB
Binary file not shown.

example/assets/fonts/Now-Bold.otf

36.9 KB
Binary file not shown.

example/assets/fonts/Now-Light.otf

35.1 KB
Binary file not shown.
35.4 KB
Binary file not shown.
35.1 KB
Binary file not shown.

example/assets/fonts/Now-Thin.otf

35 KB
Binary file not shown.

0 commit comments

Comments
 (0)