diff --git a/README.md b/README.md index 931ee24..6eadd77 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ import LoginScreen from "react-native-login-screen"; {}} - onHaveAccountPress={() => {}} + onSignupPress={() => {}} onEmailChange={(email: string) => {}} onPasswordChange={(password: string) => {}} /> @@ -73,7 +73,7 @@ import LoginScreen, { SocialButton } from "react-native-login-screen"; {}} - onHaveAccountPress={() => {}} + onSignupPress={() => {}} onEmailChange={(email: string) => {}} onPasswordChange={(password: string) => {}} > @@ -95,29 +95,30 @@ import LoginScreen, { SocialButton } from "react-native-login-screen"; ### Fundamentals -| Property | Type | Default | Description | -| ------------------ | :------: | :-------: | ------------------------------------------------------------------ | -| onLoginPress | function | undefined | set your own function when the `login button` is pressed | -| onHaveAccountPress | function | undefined | set your own function when the `have an account button` is pressed | -| onEmailChange | function | undefined | set your own function when `email` textinput has a change | -| onPasswordChange | function | undefined | set your own function when `password` textinput has a change | -| logoImageSource | source | undefined | set your own logo | +| Property | Type | Default | Description | +| ---------------- | :------: | :-------: | ------------------------------------------------------------- | +| onLoginPress | function | undefined | set your own function when the `login button` is pressed | +| onSignupPress | function | undefined | set your own function when the `Create an account` is pressed | +| onEmailChange | function | undefined | set your own function when `email` textinput has a change | +| onPasswordChange | function | undefined | set your own function when `password` textinput has a change | +| logoImageSource | source | undefined | set your own logo | ### Customizations (Optional) -| Property | Type | Default | Description | -| ----------------------- | :--------: | :------------------------: | --------------------------------------------------- | -| haveAccountText | string | "Already have an account?" | change the have account text | -| disableDivider | boolean | false | disable the divider if you do not want to use it | -| disableSocialButtons | boolean | false | disable the all social buttons | -| style | ViewStyle | default | set/override the default style for the container | -| dividerStyle | ViewStyle | default | set/override the default divider style | -| logoImageStyle | ImageStyle | default | set/override the default image style | -| textInputContainerStyle | ViewStyle | default | set/override the default text input container style | -| loginButtonStyle | ViewStyle | default | set/override the default login button style | -| loginTextStyle | TextStyle | default | set/override the default login text style | -| haveAccountButtonStyle | ViewStyle | default | set/override the default have account button style | -| haveAccountTextStyle | TextStyle | default | set/override the default have account text style | +| Property | Type | Default | Description | +| ----------------------- | :--------: | :-----------------: | --------------------------------------------------- | +| signupText | string | "Create an account" | change the sign up text | +| disableSignup | boolean | false | disable the signup if you do not want to use it | +| disableDivider | boolean | false | disable the divider if you do not want to use it | +| disableSocialButtons | boolean | false | disable the all social buttons | +| style | ViewStyle | default | set/override the default style for the container | +| dividerStyle | ViewStyle | default | set/override the default divider style | +| logoImageStyle | ImageStyle | default | set/override the default image style | +| textInputContainerStyle | ViewStyle | default | set/override the default text input container style | +| loginButtonStyle | ViewStyle | default | set/override the default login button style | +| loginTextStyle | TextStyle | default | set/override the default login text style | +| signupStyle | ViewStyle | default | set/override the default signup button style | +| signupTextStyle | TextStyle | default | set/override the default signup text style | ### Default Social Login Buttons (Optional) diff --git a/assets/Screenshots/react-native-login-screen-v2.gif b/assets/Screenshots/react-native-login-screen-v2.gif deleted file mode 100644 index ecbb97a..0000000 Binary files a/assets/Screenshots/react-native-login-screen-v2.gif and /dev/null differ diff --git a/assets/Screenshots/react-native-login-screen.gif b/assets/Screenshots/react-native-login-screen.gif index 2da6ce3..c7c11fa 100644 Binary files a/assets/Screenshots/react-native-login-screen.gif and b/assets/Screenshots/react-native-login-screen.gif differ diff --git a/example/App.tsx b/example/App.tsx index 16459fe..0ef5ece 100644 --- a/example/App.tsx +++ b/example/App.tsx @@ -1,6 +1,6 @@ import React, {useState} from 'react'; import {View, StatusBar} from 'react-native'; -import {LoginScreen, SocialButton} from 'react-native-login-screen'; +import LoginScreen, {SocialButton} from './build/dist/index'; const App = () => { const [username, setUsername] = useState(null); @@ -13,7 +13,7 @@ const App = () => { {}} - onHaveAccountPress={() => {}} + onSignupPress={() => {}} onEmailChange={(email: string) => {}} onPasswordChange={(password: string) => {}} /> diff --git a/example/assets/fonts/Now-Black.otf b/example/assets/fonts/Now-Black.otf new file mode 100644 index 0000000..996baba Binary files /dev/null and b/example/assets/fonts/Now-Black.otf differ diff --git a/example/assets/fonts/Now-Bold.otf b/example/assets/fonts/Now-Bold.otf new file mode 100644 index 0000000..9cb5004 Binary files /dev/null and b/example/assets/fonts/Now-Bold.otf differ diff --git a/example/assets/fonts/Now-Light.otf b/example/assets/fonts/Now-Light.otf new file mode 100644 index 0000000..4f878ef Binary files /dev/null and b/example/assets/fonts/Now-Light.otf differ diff --git a/example/assets/fonts/Now-Medium.otf b/example/assets/fonts/Now-Medium.otf new file mode 100644 index 0000000..bbb558f Binary files /dev/null and b/example/assets/fonts/Now-Medium.otf differ diff --git a/example/assets/fonts/Now-Regular.otf b/example/assets/fonts/Now-Regular.otf new file mode 100644 index 0000000..c5c3b8f Binary files /dev/null and b/example/assets/fonts/Now-Regular.otf differ diff --git a/example/assets/fonts/Now-Thin.otf b/example/assets/fonts/Now-Thin.otf new file mode 100644 index 0000000..69aef73 Binary files /dev/null and b/example/assets/fonts/Now-Thin.otf differ diff --git a/example/assets/fonts/NowAlt-Black.otf b/example/assets/fonts/NowAlt-Black.otf new file mode 100644 index 0000000..31e2da0 Binary files /dev/null and b/example/assets/fonts/NowAlt-Black.otf differ diff --git a/example/assets/fonts/NowAlt-Bold.otf b/example/assets/fonts/NowAlt-Bold.otf new file mode 100644 index 0000000..7515755 Binary files /dev/null and b/example/assets/fonts/NowAlt-Bold.otf differ diff --git a/example/assets/fonts/NowAlt-Light.otf b/example/assets/fonts/NowAlt-Light.otf new file mode 100644 index 0000000..3fc5163 Binary files /dev/null and b/example/assets/fonts/NowAlt-Light.otf differ diff --git a/example/assets/fonts/NowAlt-Medium.otf b/example/assets/fonts/NowAlt-Medium.otf new file mode 100644 index 0000000..2c31dd4 Binary files /dev/null and b/example/assets/fonts/NowAlt-Medium.otf differ diff --git a/example/assets/fonts/NowAlt-Regular.otf b/example/assets/fonts/NowAlt-Regular.otf new file mode 100644 index 0000000..166da89 Binary files /dev/null and b/example/assets/fonts/NowAlt-Regular.otf differ diff --git a/example/assets/fonts/NowAlt-Thin.otf b/example/assets/fonts/NowAlt-Thin.otf new file mode 100644 index 0000000..64b2385 Binary files /dev/null and b/example/assets/fonts/NowAlt-Thin.otf differ diff --git a/example/assets/logo-example.png b/example/assets/logo-example.png new file mode 100644 index 0000000..e875eb5 Binary files /dev/null and b/example/assets/logo-example.png differ diff --git a/lib/LoginScreen.style.ts b/lib/LoginScreen.style.ts index 8e89392..f56d254 100644 --- a/lib/LoginScreen.style.ts +++ b/lib/LoginScreen.style.ts @@ -14,8 +14,8 @@ interface Style { passwordTextInputContainer: ViewStyle; loginButtonStyle: ViewStyle; loginTextStyle: TextStyle; - haveAccountButtonStyle: ViewStyle; - haveAccountTextStyle: TextStyle; + signupStyle: ViewStyle; + signupTextStyle: TextStyle; dividerStyle: ViewStyle; socialLoginContainer: ViewStyle; facebookSocialButtonTextStyle: TextStyle; @@ -65,12 +65,12 @@ export default StyleSheet.create