mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
32 lines
993 B
TypeScript
32 lines
993 B
TypeScript
// Type definitions for react-virtual-keyboard 1.0
|
|
// Project: https://github.com/utzel-butzel/react-virtual-keyboard
|
|
// Definitions by: Bogdan Surai <https://github.com/bsurai>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.8
|
|
|
|
import { Component } from "react";
|
|
import { KeyboardOptions, NavigateOptions } from "virtual-keyboard";
|
|
|
|
export interface ReactKeyboardOptions extends KeyboardOptions {
|
|
accepted?: undefined; // You should use KeyboardProps.onAccepted event.
|
|
}
|
|
|
|
export type kbEvents = (event?: string | Event, keyboard?: Element, el?: Element) => void;
|
|
|
|
export interface KeyboardProps {
|
|
name?: string;
|
|
value?: string;
|
|
options?: ReactKeyboardOptions;
|
|
onAccepted?: kbEvents;
|
|
onChange?: kbEvents;
|
|
callbackParent?: kbEvents;
|
|
placeholder?: string;
|
|
}
|
|
|
|
export interface KeyboardState {
|
|
value: string;
|
|
className: string;
|
|
}
|
|
|
|
export default class Keyboard extends Component<KeyboardProps, KeyboardState> { }
|