File size: 528 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// @flow

import * as React from "react";

import Form from "../components/Form";

import type { Props as FormInputProps } from "../components/Form/FormInput.react";

type Props = {|
  ...FormInputProps,
  +label?: string,
|};

function FormTextInput(props: Props): React.Node {
  const { label, ...propsForInput } = props;

  const formInputComponent = React.createElement(Form.Input, propsForInput);

  return <Form.Group label={label}>{formInputComponent}</Form.Group>;
}

export default FormTextInput;