import React from 'react'; import { View } from 'react-native'; import { FlexBox } from '../Flex/Flex'; import type { VStackProps } from './VStack.types'; export function VStack({ fluid, divider, children, space = 0, dividerColor = '#e1e1e1', dividerWidth = '100%', DividerComponent, ...props }: VStackProps) { const len = React.Children.count(children) - 1; const Divider = DividerComponent || ( ); return ( {React.Children.map(children, (child, idx) => ( <> {React.cloneElement(child as JSX.Element, { flex: fluid ? 1 : 0, })} {idx !== len && ( {divider && Divider} )} ))} ); } VStack.displayName = 'VStack';