UNPKG

@angular-mdc/web

Version:
33 lines (32 loc) 1.61 kB
import { ViewContainerRef, InjectionToken } from '@angular/core'; import { AriaLivePoliteness } from '@angular/cdk/a11y'; /** Injection token that can be used to access the data that was passed in to a snackbar. */ export declare const MDC_SNACKBAR_DATA: InjectionToken<any>; export declare class MdcSnackbarConfig<D = any> { /** The view container to place the overlay for the snackbar into. */ viewContainerRef?: ViewContainerRef; /** Data being injected into the child component. */ data?: D | null; /** Add a CSS class or an array of classes */ classes?: string | string[]; /** Add a CSS class or an array of classes to the action button */ actionClasses?: string | string[]; /** Add a CSS class or an array of classes to the action icon */ dismissClasses?: string | string[]; /** Value must be between 4000 and 10000 or an error will be thrown. Defaults to 5000 (5 seconds). */ timeoutMs?: number; /** Positions the action button/icon below the label instead of alongside it. */ stacked?: boolean; /** Positions the snackbar on the leading edge of the screen */ leading?: boolean; /** Positions the snackbar on the trailing edge of the screen */ trailing?: boolean; /** The layout direction of the snackbar content */ direction?: string; /** Show dismiss ("X") icon */ dismiss?: boolean; /** Whether the snackbar closes when it is focused and the user presses the ESC key */ closeOnEscape?: boolean; /** The politeness level for the screen reader announcement. */ politeness?: AriaLivePoliteness; }