UNPKG

@tempots/dom

Version:

Fully-typed frontend framework alternative to React and Angular

46 lines (45 loc) 1.86 kB
import { Prop } from '../std/signal'; import { Renderable } from '../types/domain'; import { on } from './on'; /** * Binds a `Date` property to an input element. The binding is two-way. * Changes to the input element will update the property but will only be * affected by day changes and ignore time changes. * @param prop - The `Date` property to bind. * @param handler - The event handler to use (default: 'input'). * @returns A Renderable. * @public */ export declare const BindDate: (prop: Prop<Date>, handler?: keyof typeof on) => Renderable; /** * Binds a `Date` property to an input element. The binding is two-way. * @param prop - The `Date` property to bind. * @param handler - The event handler to use (default: 'input'). * @returns A Renderable. * @public */ export declare const BindDateTime: (prop: Prop<Date>, handler?: keyof typeof on) => Renderable; /** * Binds a `number` property to an input element. The binding is two-way. * @param prop - The `number` property to bind. * @param handler - The event handler to use (default: 'input'). * @returns A Renderable. * @public */ export declare const BindNumber: (prop: Prop<number>, handler?: keyof typeof on) => Renderable; /** * Binds a `string` property to an input element. The binding is two-way. * @param prop - The `string` property to bind. * @param handler - The event handler to use (default: 'input'). * @returns A Renderable. * @public */ export declare const BindText: (prop: Prop<string>, handler?: keyof typeof on) => Renderable; /** * Binds a `boolean` property to the checked value of an input element. The binding is two-way. * @param prop - The `boolean` property to bind. * @param handler - The event handler to use (default: 'input'). * @returns A Renderable. * @public */ export declare const BindChecked: (prop: Prop<boolean>) => Renderable;