1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-16 00:03:38 +00:00

Add toastr component (#568)

This commit is contained in:
Oscar Hinton
2021-12-07 18:15:56 +00:00
committed by GitHub
parent 5db94cc9d0
commit a6b95b15e3
3 changed files with 90 additions and 5 deletions

View File

@@ -1,6 +1,10 @@
import { DeviceType } from '../enums/deviceType';
import { ThemeType } from '../enums/themeType';
interface ToastOptions {
timeout?: number;
}
export abstract class PlatformUtilsService {
identityClientId: string;
getDevice: () => DeviceType;
@@ -20,7 +24,7 @@ export abstract class PlatformUtilsService {
supportsWebAuthn: (win: Window) => boolean;
supportsDuo: () => boolean;
showToast: (type: 'error' | 'success' | 'warning' | 'info', title: string, text: string | string[],
options?: any) => void;
options?: ToastOptions) => void;
showDialog: (body: string, title?: string, confirmText?: string, cancelText?: string,
type?: string, bodyIsHtml?: boolean) => Promise<boolean>;
isDev: () => boolean;