drawer-options.d.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * Use of this source code is governed by an MIT-style license that can be
  3. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  4. */
  5. import { Direction } from '@angular/cdk/bidi';
  6. import { InjectionToken, TemplateRef, Type } from '@angular/core';
  7. import { NzSafeAny } from 'ng-zorro-antd/core/types';
  8. import { NzDrawerRef } from './drawer-ref';
  9. export declare const DRAWER_DEFAULT_SIZE = 378;
  10. export declare const DRAWER_LARGE_SIZE = 736;
  11. export type NzDrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
  12. export type NzDrawerSize = 'default' | 'large';
  13. export interface NzDrawerOptionsOfComponent<T = NzSafeAny, D = NzSafeAny> {
  14. nzClosable?: boolean;
  15. nzMaskClosable?: boolean;
  16. nzCloseOnNavigation?: boolean;
  17. nzDirection?: Direction;
  18. nzMask?: boolean;
  19. nzKeyboard?: boolean;
  20. nzNoAnimation?: boolean;
  21. nzTitle?: string | TemplateRef<{}>;
  22. nzExtra?: string | TemplateRef<{}>;
  23. nzFooter?: string | TemplateRef<{}>;
  24. nzContent?: TemplateRef<{
  25. $implicit: D;
  26. drawerRef: NzDrawerRef;
  27. }> | Type<T>;
  28. /**@Deprecated**/
  29. nzContentParams?: Partial<T & D>;
  30. nzData?: D;
  31. nzMaskStyle?: object;
  32. nzBodyStyle?: object;
  33. nzWrapClassName?: string;
  34. nzSize?: NzDrawerSize;
  35. nzWidth?: number | string;
  36. nzHeight?: number | string;
  37. nzPlacement?: NzDrawerPlacement;
  38. nzZIndex?: number;
  39. nzOffsetX?: number;
  40. nzOffsetY?: number;
  41. }
  42. export interface NzDrawerOptions<T = NzSafeAny, D = NzSafeAny> extends NzDrawerOptionsOfComponent<T, D> {
  43. nzOnCancel?(): Promise<NzSafeAny>;
  44. }
  45. export declare const NZ_DRAWER_DATA: InjectionToken<any>;