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