import React, { forwardRef } from 'react'; import { View, Text } from 'react-native'; import { useThemeFactory } from '../Theme'; import { createCellGroupStyle } from './style'; import type { CellGroupProps } from './type'; const CellGroup = forwardRef((props, ref) => { const { children, title, border = true, inset, ...rest } = props; const { styles } = useThemeFactory(createCellGroupStyle); const hasBorder = border && !inset; return ( {title && {title}} {React.Children.map(children, (child, i) => ( <> {i !== 0 && } {child} ))} ); }); CellGroup.displayName = 'Cell.Group'; export default CellGroup;