react-toast-kit
Version:
A modern, accessible toast notification system for React applications with automatic CSS injection
64 lines (60 loc) • 1.81 kB
text/typescript
import * as React from 'react';
import * as react_jsx_runtime from 'react/jsx-runtime';
export { t as toastDevTools } from './toast-Bt1UHpOE.cjs';
import 'zustand';
/**
* A framework-agnostic DevTools component for React Toast Kit
* This component provides a UI for monitoring and testing toasts
*/
declare const ToastDevTools: React.FC;
interface DevToolsConfig {
/**
* Whether DevTools should be enabled
* @default false in production, true in development
*/
enabled?: boolean;
/**
* Whether DevTools should be visible by default
* @default false
*/
defaultVisible?: boolean;
/**
* Keyboard shortcut to toggle DevTools
* @default 'alt+shift+d'
*/
shortcut?: string;
/**
* Whether to show DevTools button
* @default true
*/
showButton?: boolean;
/**
* Position of the DevTools button
* @default 'bottom-right'
*/
buttonPosition?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
}
/**
* Configure the DevTools globally
* @param config DevTools configuration
*/
declare function configureDevTools(config: DevToolsConfig): void;
/**
* Hook to access DevTools visibility state
*/
declare function useDevToolsVisible(): {
visible: boolean;
setVisible: (visible: boolean) => void;
toggle: () => void;
};
declare const ClientDevTools: ({ visible }: {
visible?: boolean;
}) => react_jsx_runtime.JSX.Element | null;
/**
* DevToolsWrapper - A wrapper for DevTools with visibility control and keyboard shortcut
*/
declare function DevToolsWrapper({ children, config }: {
children?: React.ReactNode;
config?: DevToolsConfig;
}): react_jsx_runtime.JSX.Element;
export { ClientDevTools, DevToolsWrapper, ToastDevTools, configureDevTools, useDevToolsVisible };