({
flex,
gap,
alignVertical = 'start',
alignHorizontal = 'stretch',
width,
height,
padding,
margin,
backgroundColor,
children,
})
| 14 | }>; |
| 15 | |
| 16 | export const VStack: FC<Props> = ({ |
| 17 | flex, |
| 18 | gap, |
| 19 | alignVertical = 'start', |
| 20 | alignHorizontal = 'stretch', |
| 21 | width, |
| 22 | height, |
| 23 | padding, |
| 24 | margin, |
| 25 | backgroundColor, |
| 26 | children, |
| 27 | }) => ( |
| 28 | <View |
| 29 | style={[ |
| 30 | styles.base, |
| 31 | styles[`justify-${alignVertical}`], |
| 32 | styles[`align-${alignHorizontal}`], |
| 33 | { |
| 34 | flex, |
| 35 | gap, |
| 36 | width, |
| 37 | height, |
| 38 | paddingTop: padding?.top, |
| 39 | paddingRight: padding?.right, |
| 40 | paddingBottom: padding?.bottom, |
| 41 | paddingLeft: padding?.left, |
| 42 | marginTop: margin?.top, |
| 43 | marginRight: margin?.right, |
| 44 | marginBottom: margin?.bottom, |
| 45 | marginLeft: margin?.left, |
| 46 | backgroundColor, |
| 47 | }, |
| 48 | ]} |
| 49 | > |
| 50 | {children} |
| 51 | </View> |
| 52 | ); |
| 53 | |
| 54 | const styles = StyleSheet.create({ |
| 55 | base: { |
nothing calls this directly
no outgoing calls
no test coverage detected