UNPKG

@try-at-software/input-elements

Version:

A package providing different input elements that are extensible and easily configurable for your custom needs.

14 lines (13 loc) 1.13 kB
import * as React from 'react'; import { UpdateCallback } from '../IInputElement'; import { ValidationRule } from '../IValueInputElement'; import { IDynamicProps, IOperativeProps, ISingleValueInputElement, ISingleValueInputElementConfiguration, ISingleValueInputElementProps } from '../SingleValueInputElements'; declare class InputElementBuilder<TValue> { private readonly _config; private readonly _updateCallback; private readonly _validationRules; constructor(config: ISingleValueInputElementConfiguration<TValue>, updateCallback: UpdateCallback, validationRules: ValidationRule<TValue>[]); materialize<TComponentProps, TDynamicProps>(component: React.ComponentType<ISingleValueInputElementProps<TValue> & IDynamicProps<TDynamicProps> & IOperativeProps<TComponentProps>>, props: TComponentProps): ISingleValueInputElement<TValue, TComponentProps, TDynamicProps>; } export declare function prepareInputElement<TValue>(config: ISingleValueInputElementConfiguration<TValue>, updateCallback: UpdateCallback, ...validationRules: ValidationRule<TValue>[]): InputElementBuilder<TValue>; export {};