UNPKG

fractal-core

Version:

A minimalist and well crafted app, content or component is our conviction

29 lines (28 loc) 1.29 kB
import { Component, Context, Group, Module, StyleGroup, State } from '../core'; export declare function sendMsg(mod: Module, id: string, inputName: string, msg?: any): Promise<void>; export declare function setGroup(name: string, group: Group): (comp: Component<any>) => Component<any>; export declare function spaceOf<S>(ctx: Context<S>): any; export declare function props(state: any): (comp: Component<any>) => Component<any>; export declare function styles(style: StyleGroup): (comp: Component<any>) => Component<any>; export declare const compGroup: (groupName: string, arr: any[][], fn: any) => {}; /** * Get the component descendants ids * @param ctx Any Context * @param id The component id */ export declare const getDescendantIds: <S>(ctx: Context<S>, id: string) => string[]; /** * Get the context of the parent of a component * @param ctx The component context */ export declare const getParentCtx: <S>(ctx: Context<S>) => Context<State>; export interface CompOptions { state?: any; style?: StyleGroup; } /** * Function for concateniting properties to a component, makes a copy fisrt * @param component The target component * @param options Options to concatenate */ export declare const comp: (component: Component<any>, options: CompOptions) => Component<any>;