UNPKG

@whitemordred/react-native-bootstrap5

Version:

A complete React Native library that replicates Bootstrap 5.3 with 100% feature parity, full theming support, CSS variables, and dark/light mode

45 lines 1.64 kB
import React, { ReactNode } from 'react'; import { ViewStyle, TextStyle } from 'react-native'; interface ToastProps { visible: boolean; message: string; variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark'; position?: 'top' | 'bottom' | 'center'; duration?: number; onHide?: () => void; closable?: boolean; title?: string; children?: ReactNode; style?: ViewStyle; textStyle?: TextStyle; } interface ToastContainerProps { children: ReactNode; position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; style?: ViewStyle; } interface ToastHeaderProps { children: ReactNode; style?: ViewStyle; } interface ToastBodyProps { children: ReactNode; style?: ViewStyle; } export declare const ToastHeader: React.FC<ToastHeaderProps>; export declare const ToastBody: React.FC<ToastBodyProps>; export declare const ToastContainer: React.FC<ToastContainerProps>; export declare const Toast: React.FC<ToastProps>; export declare const useToast: () => { toasts: (ToastProps & { id: string; })[]; showToast: (toastProps: Omit<ToastProps, "visible" | "onHide">) => string; removeToast: (id: string) => void; showSuccess: (message: string, options?: Partial<ToastProps>) => string; showError: (message: string, options?: Partial<ToastProps>) => string; showWarning: (message: string, options?: Partial<ToastProps>) => string; showInfo: (message: string, options?: Partial<ToastProps>) => string; }; export default Toast; //# sourceMappingURL=Toast.d.ts.map