@shopware-ag/meteor-component-library
Version:
The meteor component library is a Vue component library developed by Shopware. It is based on the [Meteor Design System](https://shopware.design/).
37 lines (36 loc) • 1.07 kB
TypeScript
import { Ref } from 'vue';
export interface Snackbar {
id: string;
message: string;
variant?: "success" | "error" | "warning" | "progress";
icon?: string;
link?: {
text: string;
url: string;
};
duration?: number;
progressPercentage?: number;
uploadState?: "success" | "error";
successMessage?: string;
errorMessage?: string;
}
export declare function useSnackbar(): {
snackbars: Ref<Snackbar[]>;
addSnackbar: (snackbarData: Omit<Snackbar, "id">) => {
link?: {
text: string;
url: string;
} | undefined;
duration: number;
errorMessage?: string | undefined;
variant?: "success" | "error" | "warning" | "progress" | undefined;
icon?: string | undefined;
message: string;
progressPercentage?: number | undefined;
uploadState?: "success" | "error" | undefined;
successMessage?: string | undefined;
id: string;
};
removeSnackbar: (id: string) => void;
clearSnackbars: () => void;
};