Skip to content
Snippets Groups Projects
Commit 59c8cea2 authored by Alf Eaton's avatar Alf Eaton
Browse files

Add onChange handler for TextField demo

parent 89798329
No related branches found
No related tags found
No related merge requests found
...@@ -2,11 +2,20 @@ A form input for plain text. ...@@ -2,11 +2,20 @@ A form input for plain text.
```js ```js
<TextField/> initialState = { value: '' };
<TextField
value={state.value}
onChange={event => setState({ value: event.target.value })}/>
``` ```
The input can have a label. The input can have a label.
```js ```js
<TextField label="Foo"/> initialState = { value: '' };
<TextField
label="Foo"
value={state.value}
onChange={event => setState({ value: event.target.value })}/>
``` ```
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment