UNPKG

rynex

Version:

A minimalist TypeScript framework for building reactive web applications with no virtual DOM

78 lines 1.63 kB
/** * Rynex Form Helpers * Form elements and inputs */ import { createElement } from '../dom.js'; /** * Form element */ export function form(props, ...children) { return createElement('form', props, ...children); } /** * Textarea element */ export function textarea(props, content) { return createElement('textarea', props, content || ''); } /** * Select element */ export function select(props, ...children) { return createElement('select', props, ...children); } /** * Option element */ export function option(props, ...content) { return createElement('option', props, ...content); } /** * Checkbox input */ export function checkbox(props) { return createElement('input', { ...props, type: 'checkbox' }); } /** * Radio input */ export function radio(props) { return createElement('input', { ...props, type: 'radio' }); } /** * Fieldset element */ export function fieldset(props, ...children) { return createElement('fieldset', props, ...children); } /** * Legend element */ export function legend(props, ...content) { return createElement('legend', props, ...content); } /** * Datalist element */ export function datalist(props, ...children) { return createElement('datalist', props, ...children); } /** * Meter element */ export function meter(props) { return createElement('meter', props); } /** * Progress element */ export function progress(props) { return createElement('progress', props); } /** * Output element */ export function output(props, ...content) { return createElement('output', props, ...content); } //# sourceMappingURL=forms.js.map