mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 05:06:30 +04:00
Add guides on Getting Started with JS (#4150)
- Get started section added to the JS docs - Small fixes in the JS modules docs
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# js_gui__text_input {#js_gui__text_input}
|
||||
# Text input GUI view {#js_gui__text_input}
|
||||
|
||||
# Text input GUI view
|
||||
Displays a keyboard.
|
||||
|
||||
<img src="text_input.png" width="200" alt="Sample screenshot of the view" />
|
||||
@@ -16,29 +15,29 @@ This module depends on the `gui` module, which in turn depends on the
|
||||
recommended to conceptualize these modules first before using this one.
|
||||
|
||||
# Example
|
||||
For an example refer to the `gui.js` example script.
|
||||
For an example, refer to the `gui.js` example script.
|
||||
|
||||
# View props
|
||||
## `minLength`
|
||||
Smallest allowed text length
|
||||
The shortest allowed text length.
|
||||
|
||||
Type: `number`
|
||||
|
||||
## `maxLength`
|
||||
Biggest allowed text length
|
||||
The longest allowed text length.
|
||||
|
||||
Type: `number`
|
||||
|
||||
Default: `32`
|
||||
|
||||
## `header`
|
||||
Single line of text that appears above the keyboard
|
||||
A single line of text that appears above the keyboard.
|
||||
|
||||
Type: `string`
|
||||
|
||||
# View events
|
||||
## `input`
|
||||
Fires when the user selects the "save" button and the text matches the length
|
||||
Fires when the user selects the "Save" button and the text matches the length
|
||||
constrained by `minLength` and `maxLength`.
|
||||
|
||||
Item type: `string`
|
||||
|
||||
Reference in New Issue
Block a user