upgrade to v4

This commit is contained in:
Jorrin
2024-01-27 23:20:08 +01:00
parent 4c634abc1e
commit 8977e3ea2c
27 changed files with 1190 additions and 1264 deletions

View File

@@ -0,0 +1,20 @@
import { Text, View } from 'react-native';
type Props = {
title?: React.ReactNode | string;
subtitle?: string;
children?: React.ReactNode;
};
export default function ScreenLayout({ title, subtitle, children }: Props) {
return (
<View className="bg-shade-900 flex-1 p-12">
{typeof title === 'string' && (
<Text className="text-2xl font-bold text-white">{title}</Text>
)}
{typeof title !== 'string' && title}
<Text className="mt-1 text-sm font-bold text-white">{subtitle}</Text>
<View className="py-3">{children}</View>
</View>
);
}