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