File tree Expand file tree Collapse file tree 2 files changed +28
-20
lines changed
projects/dxc-ngx-cdk/src/lib/dxc-dialog Expand file tree Collapse file tree 2 files changed +28
-20
lines changed Original file line number Diff line number Diff line change @@ -14,23 +14,7 @@ import {
1414 coerceNumberProperty ,
1515} from "@angular/cdk/coercion" ;
1616import { BackgroundProviderService } from "../background-provider/service/background-provider.service" ;
17-
18- type Space =
19- | "xxsmall"
20- | "xsmall"
21- | "small"
22- | "medium"
23- | "large"
24- | "xlarge"
25- | "xxlarge" ;
26- ;
27-
28- type Padding = {
29- top ?: Space ;
30- bottom ?: Space ;
31- left ?: Space ;
32- right ?: Space ;
33- } ;
17+ import { DialogProperties , Space , Spacing } from "./dxc-dialog.types" ;
3418
3519@Component ( {
3620 selector : "dxc-dialog" ,
@@ -68,7 +52,7 @@ export class DxcDialogComponent {
6852 * object with 'top', 'bottom', 'left' and 'right' to
6953 * specify different padding sizes.
7054 */
71- @Input ( ) padding : Space | Padding = "small" ;
55+ @Input ( ) padding : Space | Spacing = "small" ;
7256
7357 /**
7458 * Value of the tabindex given to the close button.
@@ -90,18 +74,19 @@ export class DxcDialogComponent {
9074
9175 /**
9276 * This event will emit when the user clicks the background.
93- * The responsibility of hiding the dialog lies with the user.
77+ * The responsibility of hiding the dialog lies with the user.
9478 * */
9579 @Output ( ) onBackgroundClick : EventEmitter < void > = new EventEmitter < void > ( ) ;
9680
9781 @HostBinding ( "class" ) className ;
9882
9983 currentBackgroundColor : string ;
10084
101- defaultInputs = new BehaviorSubject < any > ( {
85+ defaultInputs = new BehaviorSubject < DialogProperties > ( {
10286 overlay : true ,
10387 isCloseVisible : true ,
10488 padding : "small" ,
89+ margin : null ,
10590 tabIndexValue : 0 ,
10691 } ) ;
10792
Original file line number Diff line number Diff line change 1+ export interface DialogProperties {
2+ margin ?: Space | Spacing ;
3+ overlay ?: boolean ;
4+ isCloseVisible ?: boolean ;
5+ padding ?: Space | Spacing ;
6+ tabIndexValue ?: number ;
7+ }
8+
9+ export type Space =
10+ | "xxsmall"
11+ | "xsmall"
12+ | "small"
13+ | "medium"
14+ | "large"
15+ | "xlarge"
16+ | "xxlarge" ;
17+
18+ export type Spacing = {
19+ top ?: Space ;
20+ bottom ?: Space ;
21+ left ?: Space ;
22+ right ?: Space ;
23+ } ;
You can’t perform that action at this time.
0 commit comments