Skip to content

Simple way to implement input fields in your projects

Notifications You must be signed in to change notification settings

knoova/input-fields

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Input fields

Install

Just run npm run knoova-input-fields

Input types

 type InputType = "string" | "password" | "mail" | "boolean" | "radio" | "upload" | "uploadImage" | "uploadPdf" | "number" | "combo"

Input interfaces

Base input interface

interface InputArgs<T> {
    type: InputType
    title: string
    description?: string
    nullable?: boolean
}

String input

interface StringInput extends InputArgs<string> {
    multiline?: number
    password?: boolean
    minLength?: number
    maxLength?: number
}

Number input

interface NumberInput extends InputArgs<string> {
    max?: number
    min?: number
}

Boolean input

interface BooleanInput extends InputArgs<boolean> {
    mustBeTrue?: boolean
}

Date input

interface DateInput extends InputArgs<string> {
    max?: string
    min?: string
}

Combo input

interface ComboInput<T> extends InputArgs<T> {
    visualName: keyof T, 
    valueName: keyof T, 
    values: T[]
}

#Field interface interface Input { model: models.Model<models.DataState>, el: JQuery set: (value: T) => void }

About

Simple way to implement input fields in your projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published