From 123a728707f7cbc527c486a8b306716962e4bd47 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Thu, 8 Apr 2021 12:30:23 -0700 Subject: Added new button and resytles existing buttons --- src/components/common/BasicButton.tsx | 77 +++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/components/common/BasicButton.tsx (limited to 'src/components/common/BasicButton.tsx') diff --git a/src/components/common/BasicButton.tsx b/src/components/common/BasicButton.tsx new file mode 100644 index 00000000..0822c66e --- /dev/null +++ b/src/components/common/BasicButton.tsx @@ -0,0 +1,77 @@ +import React from 'react'; +import {StyleProp, StyleSheet, Text, View, ViewStyle} from 'react-native'; +import {TAGG_LIGHT_BLUE} from '../../constants'; +import {TouchableOpacity} from 'react-native-gesture-handler'; +import {normalize} from '../../utils'; + +interface BasicButtonProps { + title: string; + onPress: () => void; + solid?: boolean; + externalStyles?: Record>; +} +const BasicButton: React.FC = ({ + title, + onPress, + solid, + externalStyles, +}) => { + return ( + + + + {title} + + + + ); +}; + +const styles = StyleSheet.create({ + container: { + height: '100%', + flexDirection: 'column', + justifyContent: 'space-around', + }, + genericButtonStyle: { + justifyContent: 'center', + alignItems: 'center', + borderRadius: 2, + padding: 0, + width: '100%', + height: '100%', + }, + solidButton: { + padding: 0, + backgroundColor: TAGG_LIGHT_BLUE, + }, + outlineButton: { + borderWidth: 1, + backgroundColor: 'white', + borderColor: TAGG_LIGHT_BLUE, + }, + solidButtonTitleColor: { + color: 'white', + }, + outlineButtonTitleColor: { + color: TAGG_LIGHT_BLUE, + }, + buttonTitle: { + fontSize: normalize(15), + fontWeight: '700', + letterSpacing: 1, + }, +}); + +export default BasicButton; -- cgit v1.2.3-70-g09d2 From 45327a57f0a1c81df581aba4278416015f0ddc7e Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Thu, 8 Apr 2021 12:59:02 -0700 Subject: radius and border width changed --- src/components/common/AcceptDeclineButtons.tsx | 2 +- src/components/common/BasicButton.tsx | 4 ++-- src/components/common/FriendsButton.tsx | 2 +- src/components/profile/Friends.tsx | 4 ++-- src/components/profile/ToggleButton.tsx | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/components/common/BasicButton.tsx') diff --git a/src/components/common/AcceptDeclineButtons.tsx b/src/components/common/AcceptDeclineButtons.tsx index 167148f0..7bb62fd4 100644 --- a/src/components/common/AcceptDeclineButtons.tsx +++ b/src/components/common/AcceptDeclineButtons.tsx @@ -58,7 +58,7 @@ const styles = StyleSheet.create({ backgroundColor: TAGG_LIGHT_BLUE, }, rejectButton: { - borderWidth: 1, + borderWidth: 2, backgroundColor: 'white', borderColor: TAGG_LIGHT_BLUE, }, diff --git a/src/components/common/BasicButton.tsx b/src/components/common/BasicButton.tsx index 0822c66e..1fe29cd9 100644 --- a/src/components/common/BasicButton.tsx +++ b/src/components/common/BasicButton.tsx @@ -47,7 +47,7 @@ const styles = StyleSheet.create({ genericButtonStyle: { justifyContent: 'center', alignItems: 'center', - borderRadius: 2, + borderRadius: 3, padding: 0, width: '100%', height: '100%', @@ -57,7 +57,7 @@ const styles = StyleSheet.create({ backgroundColor: TAGG_LIGHT_BLUE, }, outlineButton: { - borderWidth: 1, + borderWidth: 2, backgroundColor: 'white', borderColor: TAGG_LIGHT_BLUE, }, diff --git a/src/components/common/FriendsButton.tsx b/src/components/common/FriendsButton.tsx index 1bb39e57..6ddad93f 100644 --- a/src/components/common/FriendsButton.tsx +++ b/src/components/common/FriendsButton.tsx @@ -104,7 +104,7 @@ const styles = StyleSheet.create({ aspectRatio: 154 / 33, borderWidth: 2, borderColor: TAGG_LIGHT_BLUE, - borderRadius: 2, + borderRadius: 3, marginRight: '2%', marginLeft: '1%', }, diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx index c1dca755..b754b71a 100644 --- a/src/components/profile/Friends.tsx +++ b/src/components/profile/Friends.tsx @@ -191,7 +191,7 @@ const styles = StyleSheet.create({ height: '55%', borderColor: TAGG_LIGHT_BLUE, borderWidth: 2, - borderRadius: 2, + borderRadius: 3, padding: 0, backgroundColor: TAGG_LIGHT_BLUE, }, @@ -212,7 +212,7 @@ const styles = StyleSheet.create({ height: '55%', borderColor: TAGG_LIGHT_BLUE, borderWidth: 2, - borderRadius: 2, + borderRadius: 3, padding: 0, }, unfriendButtonTitle: { diff --git a/src/components/profile/ToggleButton.tsx b/src/components/profile/ToggleButton.tsx index ad05c1c4..4697d744 100644 --- a/src/components/profile/ToggleButton.tsx +++ b/src/components/profile/ToggleButton.tsx @@ -37,8 +37,8 @@ const styles = StyleSheet.create({ width: SCREEN_WIDTH * 0.42, height: SCREEN_WIDTH * 0.08, borderColor: TAGG_LIGHT_BLUE, - borderWidth: 1, - borderRadius: 2, + borderWidth: 2, + borderRadius: 3, marginRight: '2%', }, text: { -- cgit v1.2.3-70-g09d2