From 5b57d5c82a0d8b30a58fd66acd79f083e3019cfc Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 21 May 2021 14:07:19 -0700 Subject: Add colors through types --- src/components/common/TaggRadioButton.tsx | 5 +++-- src/constants/constants.ts | 1 + src/screens/chat/ChatScreen.tsx | 3 ++- src/screens/onboarding/BasicInfoOnboarding.tsx | 8 ++++---- 4 files changed, 10 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/components/common/TaggRadioButton.tsx b/src/components/common/TaggRadioButton.tsx index fc4008e5..25d00ec9 100644 --- a/src/components/common/TaggRadioButton.tsx +++ b/src/components/common/TaggRadioButton.tsx @@ -1,5 +1,6 @@ import React from 'react'; import {StyleSheet, TouchableOpacity, View} from 'react-native'; +import {RADIO_BUTTON_GREY, TAGG_LIGHT_BLUE_2} from '../../constants/constants'; interface TaggRadioButtonProps { pressed: boolean; @@ -10,11 +11,11 @@ const TaggRadioButton: React.FC = ({ onPress, }) => { const activeOuterStyle = { - borderColor: pressed ? '#6EE7E7' : '#BEBEBE', + borderColor: pressed ? TAGG_LIGHT_BLUE_2 : RADIO_BUTTON_GREY, }; const activeInnerStyle = { - backgroundColor: pressed ? '#6EE7E7' : 'white', + backgroundColor: pressed ? TAGG_LIGHT_BLUE_2 : 'white', }; return ( = ({navigation}) => { const insets = useSafeAreaInsets(); const chatTheme: DeepPartial = { colors: { - accent_blue: '#6EE7E7', + accent_blue: TAGG_LIGHT_BLUE_2, }, messageList: { container: { diff --git a/src/screens/onboarding/BasicInfoOnboarding.tsx b/src/screens/onboarding/BasicInfoOnboarding.tsx index 3058a04e..e5e6f59b 100644 --- a/src/screens/onboarding/BasicInfoOnboarding.tsx +++ b/src/screens/onboarding/BasicInfoOnboarding.tsx @@ -27,6 +27,7 @@ import { nameRegex, passwordRegex, phoneRegex, + TAGG_LIGHT_BLUE_2, usernameRegex, } from '../../constants'; import { @@ -70,9 +71,8 @@ const BasicInfoOnboarding: React.FC = ({route}) => { const [invalidWithError, setInvalidWithError] = useState( 'Please enter a valid ', ); - const [autoCapitalize, setAutoCap] = useState< - 'none' | 'sentences' | 'words' | 'characters' | undefined - >('none'); + const [autoCapitalize, setAutoCap] = + useState<'none' | 'sentences' | 'words' | 'characters' | undefined>('none'); const [fadeValue, setFadeValue] = useState>( new Animated.Value(0), ); @@ -565,7 +565,7 @@ const styles = StyleSheet.create({ alignItems: 'center', }, arrow: { - color: '#6EE7E7', + color: TAGG_LIGHT_BLUE_2, }, showPassContainer: { marginVertical: '1%', -- cgit v1.2.3-70-g09d2