summaryrefslogtreecommitdiff
path: root/app/components/form-row/form-row.tsx
blob: c6453bc627e9cc082440263f79fde31c7cd21d3a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import * as React from 'react'
import { View } from 'react-native'
import { PRESETS } from './form-row.presets'
import { FormRowProps } from './form-row.props'

/**
 * A horizontal container component used to hold a row of a form.
 */
export function FormRow(props: FormRowProps) {
  const viewStyle = [PRESETS[props.preset], props.style]

  return <View style={viewStyle}>{props.children}</View>
}