Split some code into seperate components

This commit is contained in:
2023-03-21 20:09:37 +01:00
parent dddd9fd666
commit 42c2d069ef
6 changed files with 264 additions and 191 deletions

20
components/Card/index.tsx Normal file
View File

@@ -0,0 +1,20 @@
import { View, Text } from "react-native";
import tw from "twrnc";
interface CardProps {
label?: string;
children: React.ReactNode;
}
export default function Card({ label, children }: CardProps) {
return (
<>
{label && <Text style={tw.style("ml-6 mt-4")}>{label}</Text>}
<View
style={tw.style("bg-white m-2 p-1 rounded-lg border border-slate-200")}
>
{children}
</View>
</>
);
}