forked from fr/deguapp
		
	Added: Link and Text component, Named links for components..., Tab layout
This commit is contained in:
		@@ -2,7 +2,7 @@ import React from "react";
 | 
			
		||||
import { Text, StyleSheet, Pressable } from "react-native";
 | 
			
		||||
 | 
			
		||||
export default function Button(props) {
 | 
			
		||||
	const { onPress, title = "Save", color = "black" } = props;
 | 
			
		||||
	const { onPress, title = "Button", color = "black" } = props;
 | 
			
		||||
	return (
 | 
			
		||||
		<Pressable
 | 
			
		||||
			style={({ pressed }) => [
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								frontend/components/Link.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								frontend/components/Link.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
import { Link as EXLink } from "expo-router";
 | 
			
		||||
 | 
			
		||||
const Link = (props) => {
 | 
			
		||||
	const defaultStyles = {
 | 
			
		||||
		color: "white",
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	return (
 | 
			
		||||
		<EXLink style={[defaultStyles, props.style]} href={props.href}>
 | 
			
		||||
			{props.children}
 | 
			
		||||
		</EXLink>
 | 
			
		||||
	);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default Link;
 | 
			
		||||
							
								
								
									
										13
									
								
								frontend/components/Text.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								frontend/components/Text.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
import React from "react";
 | 
			
		||||
import { Text as RNText } from "react-native";
 | 
			
		||||
 | 
			
		||||
const Text = (props) => {
 | 
			
		||||
	// Apply your default text color and any other styles here
 | 
			
		||||
	const defaultStyles = {
 | 
			
		||||
		color: "white", // Set the default text color to white
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	return <RNText style={[defaultStyles, props.style]}>{props.children}</RNText>;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default Text;
 | 
			
		||||
@@ -5,5 +5,6 @@ export const colors = {
 | 
			
		||||
	green: "#228B22ff",
 | 
			
		||||
	charcoal: "#2C3E50ff",
 | 
			
		||||
	black: "#020405ff",
 | 
			
		||||
	dark: "#010611",
 | 
			
		||||
	dark: "#010409",
 | 
			
		||||
	darkSecondary: "#0D1117",
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user