Created
January 25, 2019 08:17
-
-
Save koenbok/09c7e570f4d18e0578c653b4c3c6219e to your computer and use it in GitHub Desktop.
This file contains 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
import * as React from "react"; | |
export class Keyboard extends React.Component { | |
state = { key: null }; | |
onChange = event => { | |
this.setState({ key: event.target.value }); | |
}; | |
render() { | |
return ( | |
<div style={style}> | |
<div> | |
<input value={this.state.key} onChange={this.onChange} /> | |
<br /> | |
{this.state.key || "Type Something!"} | |
</div> | |
</div> | |
); | |
} | |
} | |
const style: React.CSSProperties = { | |
height: "100%", | |
display: "flex", | |
alignItems: "center", | |
justifyContent: "center", | |
textAlign: "center", | |
color: "#8855FF", | |
background: "rgba(136, 85, 255, 0.1)", | |
overflow: "hidden" | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment