react-native-trays
Version:
Production-grade, Family inspired, React Native Tray System library
25 lines • 1.13 kB
TypeScript
/**
* TrayProvider.tsx
*
* Provides the TrayProvider React context component for managing tray stacks and rendering trays in a React Native app.
* This file contains the core logic for tray registration, stack management, and context propagation.
*/
import { type ReactNode } from 'react';
import type { TrayRegistry, TrayStackConfig } from './types';
export interface TrayProviderProps<T extends TrayRegistry> {
trays: T;
children: ReactNode;
stackConfigs?: Record<string, TrayStackConfig>;
}
/**
* TrayProvider: Manages tray stacks, context, and rendering.
*
* @template T - The tray registry type.
* @param trays - An object mapping tray keys to their components.
* @param children - React children to render inside the provider.
* @param stackConfigs - Optional per-stack configuration overrides.
*
* Provides context to manage multiple, optionally-configurable tray stacks and their lifecycle.
*/
export declare const TrayProvider: <T extends TrayRegistry>({ trays, children, stackConfigs, }: TrayProviderProps<T>) => import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=TrayProvider.d.ts.map