Types update

This commit is contained in:
Francisco Hodge 2019-08-11 20:24:12 -04:00
parent 618800f455
commit 020aa04894

View File

@ -10,6 +10,12 @@ declare module 'simple-keyboard' {
buttons: string; buttons: string;
} }
interface KeyboardButtonAttributes {
attribute: string;
value: string;
buttons: string;
}
interface KeyboardOptions { interface KeyboardOptions {
/** /**
* Modify the keyboard layout. * Modify the keyboard layout.
@ -41,6 +47,11 @@ declare module 'simple-keyboard' {
*/ */
buttonTheme?: KeyboardButtonTheme[]; buttonTheme?: KeyboardButtonTheme[];
/**
* A prop to add your own attributes to one or several buttons.
*/
buttonAttributes?: KeyboardButtonAttributes[];
/** /**
* Runs a `console.log` every time a key is pressed. Displays the buttons pressed and the current input. * Runs a `console.log` every time a key is pressed. Displays the buttons pressed and the current input.
*/ */