Skip to content

Commit 20dc901

Browse files
committed
Make input changes backwards compatible
1 parent 2ea8b0c commit 20dc901

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

src/lib/ngx-drop/file-drop.component.ts

+41
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,62 @@ export class FileComponent implements OnDestroy {
2424

2525
@Input()
2626
public accept: string = '*';
27+
2728
@Input()
2829
public dropZoneLabel: string = '';
30+
/** @deprecated Will be removed in the next major version. Use `dropZoneLabel` instead. */
31+
public get headertext(): string { return this.dropZoneLabel; }
32+
/** @deprecated Will be removed in the next major version. Use `dropZoneLabel` instead. */
33+
@Input()
34+
public set headertext(value: string) {
35+
this.dropZoneLabel = value;
36+
}
37+
2938
@Input()
3039
public dropZoneClassName: string = 'ngx-file-drop__drop-zone';
40+
/** @deprecated Will be removed in the next major version. Use `dropZoneClassName` instead. */
41+
public get customstyle(): string { return this.dropZoneClassName; }
42+
/** @deprecated Will be removed in the next major version. Use `dropZoneClassName` instead. */
43+
@Input()
44+
public set customstyle(value: string) {
45+
this.dropZoneClassName = value;
46+
}
47+
3148
@Input()
3249
public contentClassName: string = 'ngx-file-drop__content';
50+
/** @deprecated Will be removed in the next major version. Use `contentClassName` instead. */
51+
public get customContentStyle(): string { return this.contentClassName; }
52+
/** @deprecated Will be removed in the next major version. Use `contentClassName` instead. */
53+
@Input()
54+
public set customContentStyle(value: string) {
55+
this.contentClassName = value;
56+
}
57+
3358
public get disabled(): boolean { return this._disabled; }
3459
@Input()
3560
public set disabled(value: boolean) {
3661
this._disabled = (value != null && `${value}` !== 'false');
3762
}
63+
/** @deprecated Will be removed in the next major version. Use `disabled` instead. */
64+
public get disableIf(): boolean { return this.disabled; }
65+
/** @deprecated Will be removed in the next major version. Use `disabled` instead. */
66+
@Input()
67+
public set disableIf(value: boolean) {
68+
this.disabled = value;
69+
}
70+
3871
@Input()
3972
public showBrowseBtn: boolean = false;
4073
@Input()
4174
public browseBtnClassName: string = 'btn btn-primary btn-xs ngx-file-drop__browse-btn';
75+
/** @deprecated Will be removed in the next major version. Use `browseBtnClassName` instead. */
76+
public get customBtnStyling(): string { return this.browseBtnClassName; }
77+
/** @deprecated Will be removed in the next major version. Use `browseBtnClassName` instead. */
78+
@Input()
79+
public set customBtnStyling(value: string) {
80+
this.browseBtnClassName = value;
81+
}
82+
4283
@Input()
4384
public browseBtnLabel: string = 'Browse files';
4485

0 commit comments

Comments
 (0)