From 8c00f95236036fc7103ed2f446575996eb004e20 Mon Sep 17 00:00:00 2001 From: Loule | Louis <35641311+Loule95450@users.noreply.github.com> Date: Wed, 28 Feb 2024 14:36:35 +0100 Subject: [PATCH] Create colors utils --- src/screens/login/LoginScreen.styles.ts | 22 ++++++++++++---------- src/utils/colors.ts | 3 +++ 2 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 src/utils/colors.ts diff --git a/src/screens/login/LoginScreen.styles.ts b/src/screens/login/LoginScreen.styles.ts index eec9f748..a1067c5f 100644 --- a/src/screens/login/LoginScreen.styles.ts +++ b/src/screens/login/LoginScreen.styles.ts @@ -1,4 +1,12 @@ import {StyleSheet} from 'react-native'; +import {Colors} from '../../utils/colors.ts'; + +const baseTextInput = { + borderWidth: 1, + padding: 10, + borderRadius: 10, + borderColor: 'gray', +}; export const styles = StyleSheet.create({ safeAreaView: { @@ -17,7 +25,7 @@ export const styles = StyleSheet.create({ flex: 3, alignItems: 'center', justifyContent: 'space-evenly', - backgroundColor: '#BB93E5', + backgroundColor: Colors.primary, borderTopLeftRadius: 30, borderTopRightRadius: 30, marginTop: 20, @@ -26,18 +34,12 @@ export const styles = StyleSheet.create({ width: '80%', }, textInput: { - borderWidth: 1, - padding: 10, - borderRadius: 10, - borderColor: 'grey', + ...baseTextInput, }, passwordInput: { - borderWidth: 1, - padding: 10, + ...baseTextInput, marginTop: 10, - borderRadius: 10, - borderColor: 'grey', - color: 'black', + color: Colors.black, }, buttonView: { marginTop: 10, diff --git a/src/utils/colors.ts b/src/utils/colors.ts new file mode 100644 index 00000000..d715aaf0 --- /dev/null +++ b/src/utils/colors.ts @@ -0,0 +1,3 @@ +export const Colors = { + primary: '#BB93E5', +};