@wordpress/components
Version:
UI components for WordPress.
28 lines • 1.37 kB
TypeScript
import type { NoticeAction } from '../notice/types';
/**
* A Snackbar displays a succinct message that is cleared out after a small delay.
*
* It can also offer the user options, like viewing a published post.
* But these options should also be available elsewhere in the UI.
*
* ```jsx
* const MySnackbarNotice = () => (
* <Snackbar>Post published successfully.</Snackbar>
* );
* ```
*/
export declare const Snackbar: import("react").ForwardRefExoticComponent<Pick<import("../notice/types").NoticeProps, "className" | "children" | "onRemove" | "spokenMessage" | "politeness" | "onDismiss"> & {
icon?: import("react").ReactNode;
explicitDismiss?: boolean;
listRef?: import("react").MutableRefObject<HTMLDivElement | null>;
} & {
actions?: Pick<NoticeAction, "label" | "url" | "onClick" | "openInNewTab">[];
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className" | "children" | "as" | "actions" | "onRemove" | "spokenMessage" | "politeness" | "onDismiss" | keyof {
icon?: import("react").ReactNode;
explicitDismiss?: boolean;
listRef?: import("react").MutableRefObject<HTMLDivElement | null>;
}> & {
as?: keyof JSX.IntrinsicElements | undefined;
} & import("react").RefAttributes<any>>;
export default Snackbar;
//# sourceMappingURL=index.d.ts.map