@stakefish/ui
Version:
<div align="center"> <a href="https://www.npmjs.com/package/@stakefish/ui"><img src="https://gateway.pinata.cloud/ipfs/QmbZL1ceA8Yiz2pKALTg919jYx141DPUGegC9L4XpyayW5" width="300" /></a> </div>
25 lines (24 loc) • 875 B
TypeScript
/// <reference types="react" />
import { SnackbarProps as MuiSnackbarProps } from "@mui/material/Snackbar";
import { AlertProps } from "./Alert";
export interface SnackbarProps extends Omit<MuiSnackbarProps, "action" | "children"> {
/**
* Props for `Alert` element.
*/
alertProps?: Omit<AlertProps, "children">;
/**
* Element positioned at the end of the component.
* If `close`, default close `IconButton` will be populated.
* If `ReactNode`, it's a custom element.
*
* Either option, triggering the action element
* executes `handleClose` callback to close the component.
*/
action?: "close" | JSX.Element;
/**
* Children element inside of `Alert` element.
*/
children: AlertProps["children"];
}
declare const Snackbar: React.FC<SnackbarProps>;
export default Snackbar;