upgrade to native wind v4

This commit is contained in:
Jorrin
2024-01-27 13:53:41 +01:00
parent 26a1b623e7
commit 4c634abc1e
21 changed files with 396 additions and 201 deletions

View File

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