-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move types to dedicated file * Add newline to the end of file * Reorganize props and add comments to identify groups * Re-added env import --------- Co-authored-by: h1divp <[email protected]>
- Loading branch information
1 parent
6d46a9e
commit 0c14ef7
Showing
12 changed files
with
115 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { router } from "expo-router"; | ||
import React from "react"; | ||
import { useFonts } from "expo-font"; | ||
import { StyleSheet, Text, TouchableOpacity, Dimensions } from "react-native"; | ||
import { LogInButtonProps } from "../../types/Props"; | ||
|
||
|
||
const LogInButton: React.FC<LogInButtonProps> = ({ onPress }) => { | ||
|
||
const [fontsLoaded, fontError] = useFonts({ | ||
'Gilroy-ExtraBold': require('../../../assets/fonts/Gilroy-ExtraBold.otf'), | ||
'Gilroy-Light': require('../../../assets/fonts/Gilroy-Light.otf'), | ||
}); | ||
|
||
if (!fontsLoaded && !fontError) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<TouchableOpacity style={styles.button} onPress={onPress}> | ||
<Text style={styles.button_text}>Log In</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: 10, | ||
}, | ||
|
||
button_text: { | ||
color: "white", | ||
fontFamily: "Gilroy-ExtraBold", | ||
fontSize: Dimensions.get("window").height * 0.03, | ||
|
||
}, | ||
}); | ||
|
||
export default LogInButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from "react"; | ||
import { MessageType } from "./Message"; | ||
|
||
/* button props */ | ||
export type LogInButtonProps = { | ||
onPress?: () => void; | ||
} | ||
|
||
export type SignUpButtonProps = { | ||
onPress?: () => void; | ||
} | ||
|
||
export type ChatSendButtonProps = { | ||
onPress?: () => void, | ||
} | ||
|
||
/* input props */ | ||
export type ChatInputProps = { | ||
value?: string, | ||
onChangeText?: (text: string) => void | ||
} | ||
|
||
/* message related props */ | ||
export type MessageProps = { | ||
messageContent: string; | ||
time: number; | ||
author: string; | ||
} | ||
|
||
export type MessageChannelProps = { | ||
messages: MessageType[], | ||
} | ||
|
||
/* misc props*/ | ||
export type CounterProps = { | ||
count: number; | ||
} | ||
|
||
export type SafeAreaWrapperProps = { | ||
children: React.ReactNode; | ||
} | ||
|
||
|
This file was deleted.
Oops, something went wrong.