Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add LargeTextButton #300

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions client/app/components/auth/AuthButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,6 @@ import {
// );
// };

export const LogInButton: React.FC<{ onPress?: () => void }> = ({
onPress,
}) => {
return (
<TouchableOpacity style={styles.login_button} onPress={onPress}>
<Text style={styles.button_text}>Login</Text>
</TouchableOpacity>
);
};

export const SignUpButton: React.FC<{ onPress?: () => void }> = ({
onPress,
}) => {

return (
<TouchableOpacity style={styles.login_button} onPress={onPress}>
<Text style={styles.button_text}>Sign Up</Text>
</TouchableOpacity>
);
};

export const ExternalAuthButton: React.FC<{
onPress?: () => void;
companyName: string;
Expand Down Expand Up @@ -111,30 +90,6 @@ export const ExternalAuthButton: React.FC<{
};

const styles = StyleSheet.create({
login_button: {
backgroundColor: "#5dbea3",
width: Dimensions.get("window").width * 0.5,
height: Dimensions.get("window").height * 0.05,
display: "flex",
justifyContent: "center",
alignItems: "center",
borderRadius: Dimensions.get("window").height / 2,
shadowColor: "#8E8E8E",
shadowRadius: 2,
shadowOpacity: 0.7,
shadowOffset: {
width: 0,
height: 2,
},
elevation: 2,
},

button_text: {
color: "white",
fontFamily: "Quicksand-Medium",
fontSize: Dimensions.get("window").height * 0.027,
},

sign_out_button: {
display: "flex",
justifyContent: "center",
Expand Down
40 changes: 40 additions & 0 deletions client/app/components/auth/LargeTextButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from "react";
import { StyleSheet, Text, TouchableOpacity, Dimensions } from "react-native";

import { LargeTextButtonProps } from "../../types/Props";

const LargeTextButton: React.FC<LargeTextButtonProps> = ({ onPress, buttonText }) => {
return (
<TouchableOpacity style={styles.button} onPress={onPress}>
<Text style={styles.button_text}>{buttonText}</Text>
</TouchableOpacity>
);
};

const styles = StyleSheet.create({
button: {
backgroundColor: "#5dbea3",
width: Dimensions.get("window").width * 0.5,
height: Dimensions.get("window").height * 0.05,
display: "flex",
justifyContent: "center",
alignItems: "center",
borderRadius: Dimensions.get("window").height / 2,
shadowColor: "#8E8E8E",
shadowRadius: 2,
shadowOpacity: 0.7,
shadowOffset: {
width: 0,
height: 2,
},
elevation: 2,
},

button_text: {
color: "white",
fontFamily: "Quicksand-Medium",
fontSize: Dimensions.get("window").height * 0.027,
},
});

export default LargeTextButton;
32 changes: 0 additions & 32 deletions client/app/components/auth/LogInButton.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions client/app/components/auth/SignUpButton.tsx

This file was deleted.

5 changes: 3 additions & 2 deletions client/app/screens/auth/LoginScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import {
} from "react-native";
import { ArrowLeftCircle } from "react-native-feather";

import LargeTextButton from "@app/components/auth/LargeTextButton";

import {
LogInButton,
ExternalAuthButton,
} from "../../components/auth/AuthButtons";
import {
Expand Down Expand Up @@ -100,7 +101,7 @@ const LoginScreen = ({ route, navigation }: any) => {
/>
</View>
<View style={styles.button_container}>
<LogInButton onPress={onHandleSubmit} />
<LargeTextButton onPress={onHandleSubmit} buttonText="Login" />
</View>
<TouchableOpacity>
<Text
Expand Down
5 changes: 3 additions & 2 deletions client/app/screens/auth/SignUpScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import {
} from "react-native";
import { ArrowLeftCircle } from "react-native-feather";

import LargeTextButton from "../../components/auth/LargeTextButton"

import {
SignUpButton,
ExternalAuthButton,
} from "../../components/auth/AuthButtons";
import {
Expand Down Expand Up @@ -117,7 +118,7 @@ const SignUpScreen = ({ navigation }: any) => {
/>
</View>
<View style={styles.button_container}>
<SignUpButton onPress={onHandleSubmit} />
<LargeTextButton onPress={onHandleSubmit} buttonText="Sign Up" />
</View>

<View style={styles.divider_container}>
Expand Down
9 changes: 3 additions & 6 deletions client/app/types/Props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import React from "react";
import { Message } from "./Message";

/* button props */
export type LogInButtonProps = {
export type LargeTextButtonProps = {
onPress?: () => void;
};

export type SignUpButtonProps = {
onPress?: () => void;
};
buttonText: string;
}

export type ChatSendButtonProps = {
onPress?: () => void;
Expand Down
Loading