UNPKG

@danfessler/react-dockable

Version:

![react-dockable-splash](https://github.com/user-attachments/assets/3465dd6d-5ea8-4249-ae9d-09e498d26797)

76 lines (60 loc) 2.51 kB
import { default as default_2 } from 'react'; import { Dispatch } from 'react'; import { JSX } from 'react/jsx-runtime'; import { SetStateAction } from 'react'; export declare const Dockable: { Root: typeof Dockable_2; Panel: typeof Panel; Window: typeof Window_2; Tab: typeof Tab; }; declare function Dockable_2({ orientation, children, layout: controledPanels, onChange, gap, radius, theme, }: DockableProps): JSX.Element; declare type DockableProps = { orientation?: "row" | "column"; layout?: LayoutNode[]; children: default_2.ReactElement<PanelProps | WindowProps | TabProps> | default_2.ReactElement<PanelProps | WindowProps | TabProps>[]; onChange?: (panels: LayoutNode[]) => void; gap?: number; radius?: number; theme?: "light" | "medium" | "dark" | "darker"; }; export declare type LayoutNode = PanelNode | WindowNode; export declare function Panel(props: PanelProps): default_2.ReactElement<PanelProps | WindowProps | TabProps, string | default_2.JSXElementConstructor<any>> | default_2.ReactElement<PanelProps | WindowProps | TabProps, string | default_2.JSXElementConstructor<any>>[]; declare type PanelNode = { id: string; type: "Panel"; orientation?: "row" | "column"; size?: number; children: LayoutNode[]; }; export declare type PanelProps = { orientation?: "row" | "column"; size?: number; children: default_2.ReactElement<PanelProps | WindowProps | TabProps> | default_2.ReactElement<PanelProps | WindowProps | TabProps>[]; }; export declare function Tab(props: TabProps): default_2.ReactNode; declare type TabId = string; export declare type TabProps = { id: string; name: string; children: default_2.ReactNode; }; export declare function useDockableLocalStorage(version: number): { layout: LayoutNode[]; setLayout: Dispatch<SetStateAction<LayoutNode[]>>; }; declare function Window_2(props: WindowProps): default_2.ReactElement<TabProps, string | default_2.JSXElementConstructor<any>> | default_2.ReactElement<TabProps, string | default_2.JSXElementConstructor<any>>[]; export { Window_2 as Window } declare type WindowNode = { id: string; type: "Window"; selected: TabId; children: TabId[]; size?: number; }; export declare type WindowProps = { children: default_2.ReactElement<TabProps> | default_2.ReactElement<TabProps>[]; size?: number; selected?: number; }; export { }