mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
upgrade to native wind v4
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user