@cimpress/react-components
Version:
React components to support the MCP styleguide
29 lines • 1.03 kB
TypeScript
import React, { ReactNode } from 'react';
import { PublicComponentProps } from './types';
type Status = 'danger' | 'info' | 'success' | 'warning';
export interface SnackbarProps extends PublicComponentProps {
/**
* One of the four validation styles: info, success, warning, or danger.
*/
status?: Status;
/**
* Snackbar renders any children given to it as contents on the right-hand side of the snackbar.
*/
children?: ReactNode;
/**
* How long to display the snackbar before autodismissing, in milliseconds.
* If not provided or if a falsy delay is given, the snackbar must be manually dismissed.
*/
delay?: number;
/**
* Callback function to be called when the snackbar auto-dismisses or is closed.
*/
onHideSnackbar?: () => void;
/**
* Controls whether or not the snackbar is hidden.
*/
show?: boolean;
}
export declare const Snackbar: (props: SnackbarProps) => React.ReactPortal;
export {};
//# sourceMappingURL=Snackbar.d.ts.map