From 480423b19f603e652025b30c772e12dfd08c2d73 Mon Sep 17 00:00:00 2001 From: FreakyCoder Date: Fri, 17 Mar 2023 20:41:39 +0300 Subject: [PATCH] refactor: version 5 is tested and ready to publish --- .eslintrc.js | 2 +- example/App.tsx | 3 +- example/lib/LoginScreen.style.ts | 183 - example/lib/LoginScreen.tsx | 355 - .../social-button/SocialButton.style.ts | 38 - .../components/social-button/SocialButton.tsx | 59 - .../lib/components/tooltip/Tooltip.style.ts | 43 - example/lib/components/tooltip/Tooltip.tsx | 21 - example/lib/helpers/emailValidator.ts | 41 - example/lib/helpers/passwordValidator.ts | 23 - example/lib/helpers/useStateWithCallback.ts | 33 - example/lib/index.ts | 7 - example/lib/local-assets/apple.png | Bin 20413 -> 0 bytes example/lib/local-assets/discord.png | Bin 24193 -> 0 bytes example/lib/local-assets/eye-off.png | Bin 12395 -> 0 bytes example/lib/local-assets/eye.png | Bin 12043 -> 0 bytes example/lib/local-assets/facebook.png | Bin 15600 -> 0 bytes example/lib/local-assets/twitter.png | Bin 19134 -> 0 bytes example/package-lock.json | 14 +- example/package.json | 2 +- example/yarn.lock | 8 +- lib/components/tooltip/Tooltip.tsx | 1 + package-lock.json | 7169 ++++++++++++----- package.json | 29 +- 24 files changed, 5036 insertions(+), 2995 deletions(-) delete mode 100644 example/lib/LoginScreen.style.ts delete mode 100644 example/lib/LoginScreen.tsx delete mode 100644 example/lib/components/social-button/SocialButton.style.ts delete mode 100644 example/lib/components/social-button/SocialButton.tsx delete mode 100644 example/lib/components/tooltip/Tooltip.style.ts delete mode 100644 example/lib/components/tooltip/Tooltip.tsx delete mode 100644 example/lib/helpers/emailValidator.ts delete mode 100644 example/lib/helpers/passwordValidator.ts delete mode 100644 example/lib/helpers/useStateWithCallback.ts delete mode 100644 example/lib/index.ts delete mode 100644 example/lib/local-assets/apple.png delete mode 100644 example/lib/local-assets/discord.png delete mode 100644 example/lib/local-assets/eye-off.png delete mode 100644 example/lib/local-assets/eye.png delete mode 100644 example/lib/local-assets/facebook.png delete mode 100644 example/lib/local-assets/twitter.png diff --git a/.eslintrc.js b/.eslintrc.js index 2b7ae7c..6097b22 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,10 +1,10 @@ module.exports = { root: true, extends: [ + "@react-native", "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended", - "@react-native-community", "prettier", ], ignorePatterns: [ diff --git a/example/App.tsx b/example/App.tsx index c894880..a034686 100644 --- a/example/App.tsx +++ b/example/App.tsx @@ -1,7 +1,6 @@ import React from 'react'; import {View, StatusBar, UIManager, Platform} from 'react-native'; -// import LoginScreen from 'react-native-login-screen'; -import LoginScreen from './lib/LoginScreen'; +import LoginScreen from 'react-native-login-screen'; import TextInput from 'react-native-text-input-interactive'; if ( diff --git a/example/lib/LoginScreen.style.ts b/example/lib/LoginScreen.style.ts deleted file mode 100644 index 232224c..0000000 --- a/example/lib/LoginScreen.style.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { - ViewStyle, - ImageStyle, - Dimensions, - StyleSheet, - TextStyle, -} from 'react-native'; -const {width: ScreenWidth} = Dimensions.get('screen'); - -interface Style { - container: ViewStyle; - logoImageStyle: ImageStyle; - textInputContainer: ViewStyle; - passwordTextInputContainer: ViewStyle; - loginButtonStyle: ViewStyle; - loginTextStyle: TextStyle; - signupStyle: ViewStyle; - signupTextStyle: TextStyle; - dividerStyle: ViewStyle; - socialLoginContainer: ViewStyle; - facebookSocialButtonTextStyle: TextStyle; - twitterSocialButtonTextStyle: TextStyle; - discordSocialButtonTextStyle: TextStyle; - socialButtonStyle: ViewStyle; - eyeIconContainer: ViewStyle; - eyeIcon: ImageStyle; - shakeText: TextStyle; - emailTextInputContainer: ViewStyle; - emailTooltipContainer: ViewStyle; - emailTooltipTextStyle: TextStyle; - emailTooltipRedTextStyle: TextStyle; - emailTooltipContentStyle: ViewStyle; - emailTooltipBackgroundStyle: ViewStyle; - passwordTooltipStyle: ViewStyle; - passwordTooltipContainer: ViewStyle; - passwordTooltipContentStyle: ViewStyle; - passwordTooltipTextStyle: TextStyle; - passwordTooltipRedTextStyle: TextStyle; - passwordTooltipBackgroundStyle: ViewStyle; -} - -export default StyleSheet.create