UNPKG

@hpcc-js/react

Version:
29 lines (28 loc) 1.27 kB
import { FunctionComponent } from "preact"; import { HTMLWidget, SVGWidget } from "@hpcc-js/common"; export declare function render<P>(C: FunctionComponent<P>, props: Readonly<P>, parent: Element | Document | ShadowRoot | DocumentFragment, replaceNode?: Element | Text): void; export declare function svgRender<P>(C: FunctionComponent<P>, props: Readonly<P>, parent: Element | Document | ShadowRoot | DocumentFragment, replaceNode?: Element | Text): void; export declare class HTMLAdapter<P> extends HTMLWidget { protected readonly _component: FunctionComponent<P>; props(): P; props(_: Partial<P>): this; prop<K extends keyof P>(_: K): P[K]; prop<K extends keyof P>(_: K, value: P[K]): this; constructor(_component: FunctionComponent<P>); update(domNode: any, element: any): void; } export interface HTMLAdapter<P> { _props: P; } export declare class SVGAdapter<P> extends SVGWidget { protected readonly _component: FunctionComponent<P>; props(): P; props(_: Partial<P>): this; prop<K extends keyof P>(_: K): P[K]; prop<K extends keyof P>(_: K, value: P[K]): this; constructor(_component: FunctionComponent<P>); update(domNode: any, element: any): void; } export interface SVGAdapter<P> { _props: P; }