UNPKG

@cn-ui/core

Version:

The @cn-ui/core is a collection of UI components and utilities for building modern web applications with SolidJS.

22 lines (21 loc) 856 B
import { type Accessor, type JSX, type JSXElement } from "solid-js"; export declare const createRuntimeRoot: (id: string) => HTMLElement | undefined; /** 全局创建一个子组件用于 Message、Notice 等组件的渲染 */ export declare const createRuntimeArea: (id: string, Comp: () => JSX.Element) => (() => void) | undefined; export declare class FloatingArea<T> { id: string; store: import("@cn-ui/reactive").Atom<T[]>; constructor(id: string); createArea(): this; render(): JSX.Element; } export declare class EasyPortal extends FloatingArea<JSXElement> { render(): JSX.Element; addRender(symbol: symbol, item: JSXElement): void; removeRender(symbol: symbol): void; cache: WeakMap<any, JSX.Element>; Portal: (props: { children: JSXElement; show: Accessor<boolean>; }) => JSX.Element; }