mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
feat(interface/input): minLength & maxLength option (#121)
* feat(interface/input): minLength & maxLength option * Delete yarn.lock * Fix Typescript
This commit is contained in:
1 parent
6ce570cfae
commit
cb58b4bc48
1 file changed
+4
-2
@@ -47,6 +47,8 @@ Available properties per field type:
|
|||||||
* disabled?: `boolean`
|
* disabled?: `boolean`
|
||||||
* default?: `string`
|
* default?: `string`
|
||||||
* password?: `boolean`
|
* password?: `boolean`
|
||||||
|
* min?: `number`
|
||||||
|
* max?: `number`
|
||||||
|
|
||||||
* number
|
* number
|
||||||
* label: `string`
|
* label: `string`
|
||||||
@@ -221,7 +223,7 @@ console.log(input, input[0], input[1])
|
|||||||
|
|
||||||
```lua
|
```lua
|
||||||
local input = lib.inputDialog('Dialog title', {
|
local input = lib.inputDialog('Dialog title', {
|
||||||
{type = 'input', label = 'Text input', description = 'Some input description'},
|
{type = 'input', label = 'Text input', description = 'Some input description', required = true, min = 4, max = 16},
|
||||||
{type = 'number', label = 'Number input', description = 'Some number description', icon = 'hashtag'},
|
{type = 'number', label = 'Number input', description = 'Some number description', icon = 'hashtag'},
|
||||||
{type = 'checkbox', label = 'Simple checkbox'},
|
{type = 'checkbox', label = 'Simple checkbox'},
|
||||||
{type = 'color', label = 'Colour input', default = '#eb4034'},
|
{type = 'color', label = 'Colour input', default = '#eb4034'},
|
||||||
@@ -247,7 +249,7 @@ This function is **asynchronous** requiring you to do a `.then` callback on the
|
|||||||
|
|
||||||
```ts
|
```ts
|
||||||
const input = await lib.inputDialog('Police locker', [
|
const input = await lib.inputDialog('Police locker', [
|
||||||
{type: 'input', label: 'Text input', description: 'Some input description'},
|
{type: 'input', label: 'Text input', description: 'Some input description', required: true, min: 3, max: 16},
|
||||||
{type: 'number', label: 'Number input', description: 'Some number description', icon: 'hashtag'},
|
{type: 'number', label: 'Number input', description: 'Some number description', icon: 'hashtag'},
|
||||||
{type: 'checkbox', label: 'Simple checkbox'},
|
{type: 'checkbox', label: 'Simple checkbox'},
|
||||||
{type: 'color', label: 'Colour input', default: '#eb4034'},
|
{type: 'color', label: 'Colour input', default: '#eb4034'},
|
||||||
|
|||||||
Reference in new issue
Block a user