mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 15:33:26 +00:00
25 lines
693 B
TypeScript
25 lines
693 B
TypeScript
import { View } from 'react-native';
|
|
|
|
import { BoldText, RegularText } from '../ui/Text';
|
|
|
|
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 py-12">
|
|
{typeof title === 'string' && (
|
|
<BoldText className="text-2xl font-bold text-white">{title}</BoldText>
|
|
)}
|
|
{typeof title !== 'string' && title}
|
|
<RegularText className="text-shade-200 mt-1 text-sm">
|
|
{subtitle}
|
|
</RegularText>
|
|
<View className="py-3">{children}</View>
|
|
</View>
|
|
);
|
|
}
|