import * as React from 'react'; import { View, ViewStyle, StyleSheet, StyleProp, TextStyle, } from 'react-native'; import type { Theme } from '../../types'; import { withTheme } from '../../core/theming'; import { Text } from '../..'; type Props = React.ComponentPropsWithRef & { children: React.ReactNode; style?: StyleProp; theme: Theme; title?: string; titleStyle?: StyleProp; }; const ListSection = ({ children, style, theme, title, titleStyle, ...rest }: Props) => ( {title && ( {title} )} {children} ); const styles = StyleSheet.create({ container: { padding: 8, }, title: { fontSize: 13, marginVertical: 8, }, }); export default withTheme(ListSection);