Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit ac4b047

Browse files
react-schema-form TextAreaField converted
1 parent 8c561ef commit ac4b047

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

src/components/HyperMediaControls/TextAreaField.js renamed to src/components/HyperMediaControls/TextAreaField.tsx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
1-
import React from 'react';
21
import { TextField } from '@material-ui/core';
2+
import React, { FormEventHandler, StatelessComponent } from 'react';
33
import { ComposedComponent } from 'react-schema-form';
44

5-
const TextAreaField = ({ form, error, onChangeValidate, value }) => (
5+
interface TextAreaFieldProps {
6+
error: string;
7+
form: {
8+
description: string;
9+
htmlClass: string;
10+
placeholder: string;
11+
readonly: boolean;
12+
title: string;
13+
type: string;
14+
};
15+
onChangeValidate: FormEventHandler;
16+
value: string;
17+
}
18+
19+
const TextAreaField: StatelessComponent<TextAreaFieldProps> = ({
20+
form,
21+
error,
22+
onChangeValidate,
23+
value,
24+
}) => (
625
<div className={form.htmlClass}>
726
<TextField
827
type={form.type}

0 commit comments

Comments
 (0)