parent
35d32527e2
commit
efe9928752
@ -1,8 +0,0 @@
|
|||||||
import { PropsWithChildren } from "react";
|
|
||||||
import { View } from "react-native";
|
|
||||||
|
|
||||||
type props = PropsWithChildren;
|
|
||||||
|
|
||||||
export default function Screen({ children }: props) {
|
|
||||||
return <View className={"h-full p-4"}>{children}</View>;
|
|
||||||
}
|
|
@ -0,0 +1,17 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { TouchableOpacity, View } from "react-native";
|
||||||
|
import CustomText from "./Text";
|
||||||
|
|
||||||
|
type props = { title: string; size: string };
|
||||||
|
|
||||||
|
const Button = ({ title, size }: props) => (
|
||||||
|
<View className="bg-black rounded-3xl">
|
||||||
|
<TouchableOpacity className="p-4">
|
||||||
|
<CustomText center={true} color="white" size={size}>
|
||||||
|
{title}
|
||||||
|
</CustomText>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default Button;
|
@ -0,0 +1,13 @@
|
|||||||
|
import { PropsWithChildren } from "react";
|
||||||
|
import { View } from "react-native";
|
||||||
|
import { SafeAreaView } from "react-native-safe-area-context";
|
||||||
|
|
||||||
|
type props = PropsWithChildren;
|
||||||
|
|
||||||
|
export default function Screen({ children }: props) {
|
||||||
|
return (
|
||||||
|
<SafeAreaView>
|
||||||
|
<View className={"h-full p-4"}>{children}</View>
|
||||||
|
</SafeAreaView>
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
import { PropsWithChildren } from "react";
|
||||||
|
import { Text } from "react-native";
|
||||||
|
|
||||||
|
type props = PropsWithChildren & {
|
||||||
|
center?: boolean;
|
||||||
|
color?: string;
|
||||||
|
size?: string;
|
||||||
|
bold?: boolean;
|
||||||
|
isLink?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
const CustomText = ({ children, center, color, size, bold, isLink }: props) => {
|
||||||
|
const className =
|
||||||
|
"text-" +
|
||||||
|
(size ?? "md") +
|
||||||
|
" " +
|
||||||
|
(center ? "text-center" : "") +
|
||||||
|
" " +
|
||||||
|
("text-" + (color ?? "black ")) +
|
||||||
|
" " +
|
||||||
|
(bold ? "font-bold" : "") +
|
||||||
|
" " +
|
||||||
|
(isLink ? "text-orange-500 underline" : "");
|
||||||
|
return <Text className={className}>{children}</Text>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CustomText;
|
Loading…
Reference in new issue