Skip to content

Commit

Permalink
feat(keyboard): Use KeyboardStyle for style config option (#969)
Browse files Browse the repository at this point in the history
Co-authored-by: jcesarmobile <[email protected]>
  • Loading branch information
theproducer and jcesarmobile authored May 13, 2022
1 parent aa623eb commit 42a01b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions keyboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ On iOS, the keyboard can be configured with the following options:
| Prop | Type | Description | Default | Since |
| ------------------------ | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----- |
| **`resize`** | <code><a href="#keyboardresize">KeyboardResize</a></code> | Configure the way the app is resized when the Keyboard appears. Only available on iOS. | <code>native</code> | 1.0.0 |
| **`style`** | <code>'dark' \| 'light'</code> | Override the keyboard style if your app doesn't support dark/light theme changes. If not set, the keyboard style will depend on the device appearance. Only available on iOS. | | 1.0.0 |
| **`style`** | <code><a href="#keyboardstyle">KeyboardStyle</a></code> | Override the keyboard style if your app doesn't support dark/light theme changes. If not set, the keyboard style will depend on the device appearance. Only available on iOS. | | 1.0.0 |
| **`resizeOnFullScreen`** | <code>boolean</code> | There is an Android bug that prevents the keyboard from resizing the WebView when the app is in full screen (i.e. if StatusBar plugin is used to overlay the status bar). This setting, if set to true, add a workaround that resizes the WebView even when the app is in full screen. Only available for Android | | 1.1.0 |

### Examples
Expand All @@ -53,7 +53,7 @@ In `capacitor.config.json`:
"plugins": {
"Keyboard": {
"resize": "body",
"style": "dark",
"style": "DARK",
"resizeOnFullScreen": true
}
}
Expand All @@ -71,7 +71,7 @@ const config: CapacitorConfig = {
plugins: {
Keyboard: {
resize: "body",
style: "dark",
style: "DARK",
resizeOnFullScreen: true,
},
},
Expand Down
4 changes: 2 additions & 2 deletions keyboard/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ declare module '@capacitor/cli' {
* Only available on iOS.
*
* @since 1.0.0
* @example "dark"
* @example "DARK"
*/
style?: 'dark' | 'light';
style?: KeyboardStyle;

/**
* There is an Android bug that prevents the keyboard from resizing the WebView
Expand Down

0 comments on commit 42a01b4

Please sign in to comment.