UNPKG

gd-bs

Version:

Bootstrap JavaScript, TypeScript and Web Components library.

16 lines (12 loc) 549 B
import { IFormControlProps } from "./controlTypes"; import { IFormProps } from "./formTypes"; /** * Custom Controls */ export class CustomControls { private static _customTypes = {}; // Gets the event by type static getByType(key: number): (props?: IFormControlProps, formProps?: IFormProps) => void { return this._customTypes[key]; } // Registers a custom control type static registerType(key: number, event: (props?: IFormControlProps, formProps?: IFormProps) => void) { this._customTypes[key] = event; } }