Files
PeerScribe/components/common/Section.tsx
2024-08-11 18:10:54 +05:30

18 lines
534 B
TypeScript

import {PropsWithChildren} from 'react';
import {Dimensions, StyleSheet, Text, View} from 'react-native';
import {Colors} from 'react-native/Libraries/NewAppScreen';
import {styles} from './styles';
type SectionProps = PropsWithChildren<{
title: string;
}>;
export function Section({children, title}: SectionProps): React.JSX.Element {
return (
<View style={styles.sectionContainer}>
<Text style={styles.sectionTitle}>{title}</Text>
<Text style={[styles.sectionDescription]}>{children}</Text>
</View>
);
}