Last active
June 6, 2018 15:28
-
-
Save bookercodes/12b67d4f7a4c848d845ad958710d22c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/UsernameForm.js | |
import React, { Component } from 'react' | |
import { TextInput } from 'react-desktop/macOs' | |
import { Button } from 'react-desktop/macOs' | |
class UsernameForm extends Component { | |
constructor() { | |
super() | |
this.state = { | |
username: '' | |
} | |
} | |
handleSubmit = e => { | |
e.preventDefault() | |
this.props.handleSubmit(this.state.username) | |
} | |
handleChange = e => { | |
this.setState({ username: e.target.value }) | |
} | |
render() { | |
return ( | |
<div className="username-form"> | |
<form onSubmit={this.handleSubmit}> | |
<div> | |
<TextInput | |
label="Username:" | |
placeholder="For example, @bookercodes" | |
value={this.state.username} | |
onChange={this.handleChange} | |
/> | |
</div> | |
<div> | |
<Button color="blue" type="submit"> | |
Submit | |
</Button> | |
</div> | |
</form> | |
</div> | |
) | |
} | |
} | |
export default UsernameForm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can I change the macOS part to win?