@octopusdeploy/design-system-components
Version:
The design systems component library.
26 lines (25 loc) • 1.03 kB
TypeScript
import type React from "react";
export type InlineSnackbarVariations = "neutral" | "success";
export interface InlineSnackbarProps {
/**
* Controls the style of the InlineSnackbar.
*/
variant: InlineSnackbarVariations;
/**
* Controls whether the InlineSnackbar is being shown.
*/
show: boolean;
/**
* Specifies how long the InlineSnackbar will remain open, in ms. After the time has elapsed, the InlineSnackbar will invoke the `onClose` callback.
*/
autoHideDuration?: number;
/**
* The content or message that will be displayed within the InlineSnackbar.
*/
content: string | React.ReactNode;
/**
* The callback is invoked when the `autoHideDuration` has elapsed. This callback should be used to change the `open` state, controlled in a parent component.
*/
onClose?(): void;
}
export declare function InlineSnackbar({ variant, show, autoHideDuration, content, onClose }: InlineSnackbarProps): import("react/jsx-runtime").JSX.Element;