https://github.com/smartface/sf-component-keyboardlayout
https://github.com/smartface/sf-component-keyboardlayout
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/smartface/sf-component-keyboardlayout
- Owner: smartface
- License: other
- Created: 2019-12-18T06:40:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-07T13:45:47.000Z (about 3 years ago)
- Last Synced: 2025-02-01T20:30:18.652Z (over 1 year ago)
- Language: TypeScript
- Size: 1.48 MB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Smartface KeyboardLayout Component
[](https://www.npmjs.com/package/@smartface/component-keyboardlayout)
## Installation
Execute the command on the scripts directory
```shell
yarn i @smartface/component-keyboardlayout
```
## KeyboardLayout : Class
Provides a component for iOS that goes at the top of a keyboard when focused on a TextBox
Number-only keyboard on iOS does not have a ActionKey on it, therefore it is recommended to use this component for ease of usage.
This component is not supported on Android.
**Author**: Furkan Arabacı
**Copyright**: Smartface 2019
* [KeyboardLayout](#module_KeyboardLayout) : Class
* _static_
* [.init(textBoxes)](#module_KeyboardLayout.init) ⇒ Array.<Object>
* _inner_
* [~KeyboardLayout](#module_KeyboardLayout..KeyboardLayout)
* [~toggleVisibilityofUpImage(disabled)](#module_KeyboardLayout..toggleVisibilityofUpImage)
* [~toggleVisibilityofDownImage(disabled)](#module_KeyboardLayout..toggleVisibilityofDownImage)
* [~toggleVisibilityOfUpImage(visible)](#module_KeyboardLayout..toggleVisibilityOfUpImage)
* [~toggleVisibilityOfDownImage(visible)](#module_KeyboardLayout..toggleVisibilityOfDownImage)
* [~toggleVisibilityOfDoneButton(visible)](#module_KeyboardLayout..toggleVisibilityOfDoneButton)
### KeyboardLayout.init(textBoxes) ⇒ Array.<Object>
Initializes a keyboard layout for each given textbox or material textbox
When given one textBox, up and down buttons will be disabled by default.
**Kind**: static method of [KeyboardLayout](#module_KeyboardLayout)
**Returns**: Array.<Object> - - Keyboard layouts as an order of textboxes given initially
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| textBoxes | Array.<Object> \| Object | Array of or single textBox instance |
### KeyboardLayout~KeyboardLayout
**Kind**: inner class of [KeyboardLayout](#module_KeyboardLayout)
### KeyboardLayout~toggleVisibilityofUpImage(disabled)
Sets disability of up image. When given true, it will gray out the layout.
**Kind**: inner method of [KeyboardLayout](#module_KeyboardLayout)
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| disabled | boolean | Pushes .disabled class to the layout, grays out by default |
### KeyboardLayout~toggleVisibilityofDownImage(disabled)
Sets disability of down image. When given true, it will gray out the layout.
**Kind**: inner method of [KeyboardLayout](#module_KeyboardLayout)
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| disabled | boolean | Pushes .disabled class to the layout, grays out by default |
### KeyboardLayout~toggleVisibilityOfUpImage(visible)
Sets visibility of up image
**Kind**: inner method of [KeyboardLayout](#module_KeyboardLayout)
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| visible | boolean | Toggles visibility |
### KeyboardLayout~toggleVisibilityOfDownImage(visible)
Sets visibility of down image
**Kind**: inner method of [KeyboardLayout](#module_KeyboardLayout)
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| visible | boolean | Toggles visibility |
### KeyboardLayout~toggleVisibilityOfDoneButton(visible)
Sets visibility of done button
**Kind**: inner method of [KeyboardLayout](#module_KeyboardLayout)
**Access**: public
| Param | Type | Description |
| --- | --- | --- |
| visible | boolean | Toggles visibility |