UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

54 lines 1.91 kB
import type { ControlConfig } from '../types'; /** * Render a control component as HTML */ export declare function renderControl(config: ControlConfig, value: any, onChange: string): string; /** * Text input control */ export declare function renderTextControl(title: string, value: string, onChange: string): string; /** * Number input control */ export declare function renderNumberControl(title: string, value: number, onChange: string, config: ControlConfig): string; /** * Checkbox control */ export declare function renderCheckboxControl(title: string, value: boolean, onChange: string): string; /** * Select dropdown control */ export declare function renderSelectControl(title: string, value: any, onChange: string, config: ControlConfig): string; /** * Radio button group control */ export declare function renderRadioControl(title: string, value: any, onChange: string, config: ControlConfig): string; /** * Color picker control */ export declare function renderColorControl(title: string, value: string, onChange: string): string; /** * Textarea control */ export declare function renderTextareaControl(title: string, value: string, onChange: string): string; /** * Slider control */ export declare function renderSliderControl(title: string, value: number, onChange: string, config: ControlConfig): string; /** * JSON editor control */ export declare function renderJsonControl(title: string, value: any, onChange: string): string; /** * Date input control */ export declare function renderDateControl(title: string, value: string, onChange: string): string; /** * Get CSS styles for controls */ export declare function getControlStyles(): string; /** * Button group control */ export declare function renderButtonGroupControl(title: string, value: any, onChange: string, config: ControlConfig): string; declare type ControlOption = string | { value: any, label: string }