mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 14:03:26 +00:00
[ui] font added, movie item added, pages layout
This commit is contained in:
31
apps/mobile/components/layout/screenLayout.tsx
Normal file
31
apps/mobile/components/layout/screenLayout.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import { View } from 'react-native';
|
||||
import { globalStyles } from '../../styles/global';
|
||||
import { styles } from './styles';
|
||||
import { BoldText, RegularText } from '../Styled';
|
||||
|
||||
type Props = {
|
||||
title?: React.ReactNode | string;
|
||||
subtitle?: string;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
export default function ScreenLayout({ title, subtitle, children }: Props) {
|
||||
return (
|
||||
<View
|
||||
style={[
|
||||
globalStyles.pageContainer,
|
||||
globalStyles.container,
|
||||
styles.container,
|
||||
]}
|
||||
>
|
||||
{typeof title === 'string' && (
|
||||
<BoldText style={globalStyles.sectionTitle}>{title}</BoldText>
|
||||
)}
|
||||
{typeof title !== 'string' && title}
|
||||
<RegularText style={[{ marginTop: 4 }, globalStyles.sectionSubtitle]}>
|
||||
{subtitle}
|
||||
</RegularText>
|
||||
<View style={styles.children}>{children}</View>
|
||||
</View>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user