@nexusui/components
Version:
These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.
40 lines (39 loc) • 1.88 kB
TypeScript
import React from 'react';
import { OptionsObject, OptionsWithExtraProps, SnackbarKey, SnackbarMessage, SnackbarProviderProps } from 'notistack';
import { BaseVariantProperties } from './components/SnackbarAlert';
declare module 'notistack' {
interface VariantOverrides {
success: Partial<BaseVariantProperties>;
warning: Partial<BaseVariantProperties>;
info: Partial<BaseVariantProperties>;
error: Partial<BaseVariantProperties>;
}
}
export declare enum VariantType {
default = "default",
error = "error",
success = "success",
warning = "warning",
info = "info"
}
/**
* The SnackbarUtilsConfigurator component is used to set up a configuration that allows for global access to the enqueueSnackbar function from notistack without the need for extensive imports or setup.
*/
export declare const SnackbarUtilsConfigurator: (props: {
children?: React.ReactNode;
}) => import("react/jsx-runtime").JSX.Element;
/**
* The GlobalSnackbarProvider component is a wrapper for the SnackbarProvider component from notistack.
*/
export declare const GlobalSnackbarProvider: ({ children, ...rest }: SnackbarProviderProps) => import("react/jsx-runtime").JSX.Element;
/**
* The Snackbar is a global wrapper for the enqueueSnackbar function from notistack.
*/
export declare const Snackbar: {
success(msg: SnackbarMessage, options?: Omit<OptionsWithExtraProps<"success">, "variant">): SnackbarKey;
warning(msg: SnackbarMessage, options?: Omit<OptionsWithExtraProps<"warning">, "variant">): SnackbarKey;
info(msg: SnackbarMessage, options?: Omit<OptionsWithExtraProps<"info">, "variant">): SnackbarKey;
error(msg: SnackbarMessage, options?: Omit<OptionsWithExtraProps<"error">, "variant">): SnackbarKey;
toast(msg: SnackbarMessage, options?: OptionsObject): SnackbarKey;
close(key?: SnackbarKey): void;
};