Ran linter
This commit is contained in:
@ -6,7 +6,7 @@ Use object destructuring to set defaults for certain attributes of the `<input>`
|
||||
Render an `<input>` element with the appropriate attributes and use the `callback` function in the `onChange` event to pass the value of the input to the parent.
|
||||
|
||||
```jsx
|
||||
function Input ({ callback, type = 'text', disabled = false, readOnly = false, placeholder = '' }) {
|
||||
function Input({ callback, type = 'text', disabled = false, readOnly = false, placeholder = '' }) {
|
||||
return (
|
||||
<input
|
||||
type={type}
|
||||
@ -21,7 +21,7 @@ function Input ({ callback, type = 'text', disabled = false, readOnly = false, p
|
||||
|
||||
```jsx
|
||||
ReactDOM.render(
|
||||
<Input type='text' placeholder='Insert some text here...' callback={(val) => console.log(val)}/>,
|
||||
<Input type="text" placeholder="Insert some text here..." callback={val => console.log(val)} />,
|
||||
document.getElementById('root')
|
||||
);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user