mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
24 lines
729 B
TypeScript
24 lines
729 B
TypeScript
import * as React from "react";
|
|
import Keyboard, { ReactKeyboardOptions } from "react-virtual-keyboard";
|
|
|
|
export interface KbState {
|
|
textarea: string;
|
|
}
|
|
|
|
export default class MyKeyboard extends React.Component<{}, KbState> {
|
|
state = {
|
|
textarea: ''
|
|
};
|
|
onTextareaChanged = (newState: string) => {
|
|
this.setState({ textarea: newState });
|
|
}
|
|
|
|
render() {
|
|
return (<Keyboard
|
|
value={ this.state.textarea }
|
|
name='thetextareaname'
|
|
options={{type: 'textarea', layout: 'qwerty', autoAccept: true, alwaysOpen: false, appendLocally: true, color: 'light', class: 'sxcycx', updateOnChange: true }}
|
|
callbackParent={this.onTextareaChanged} />);
|
|
}
|
|
}
|