bottom-sheet-config.d.ts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.io/license
  7. */
  8. import { Direction } from '@angular/cdk/bidi';
  9. import { ScrollStrategy } from '@angular/cdk/overlay';
  10. import { InjectionToken, ViewContainerRef } from '@angular/core';
  11. /** Injection token that can be used to access the data that was passed in to a bottom sheet. */
  12. export declare const MAT_BOTTOM_SHEET_DATA: InjectionToken<any>;
  13. /**
  14. * Configuration used when opening a bottom sheet.
  15. */
  16. export declare class MatBottomSheetConfig<D = any> {
  17. /** The view container to place the overlay for the bottom sheet into. */
  18. viewContainerRef?: ViewContainerRef;
  19. /** Extra CSS classes to be added to the bottom sheet container. */
  20. panelClass?: string | string[];
  21. /** Text layout direction for the bottom sheet. */
  22. direction?: Direction;
  23. /** Data being injected into the child component. */
  24. data?: D | null;
  25. /** Whether the bottom sheet has a backdrop. */
  26. hasBackdrop?: boolean;
  27. /** Custom class for the backdrop. */
  28. backdropClass?: string;
  29. /** Whether the user can use escape or clicking outside to close the bottom sheet. */
  30. disableClose?: boolean;
  31. /** Aria label to assign to the bottom sheet element. */
  32. ariaLabel?: string | null;
  33. /**
  34. * Whether the bottom sheet should close when the user goes backwards/forwards in history.
  35. * Note that this usually doesn't include clicking on links (unless the user is using
  36. * the `HashLocationStrategy`).
  37. */
  38. closeOnNavigation?: boolean;
  39. /** Whether the bottom sheet should focus the first focusable element on open. */
  40. autoFocus?: boolean;
  41. /**
  42. * Whether the bottom sheet should restore focus to the
  43. * previously-focused element, after it's closed.
  44. */
  45. restoreFocus?: boolean;
  46. /** Scroll strategy to be used for the bottom sheet. */
  47. scrollStrategy?: ScrollStrategy;
  48. }