Skip to content

Commit

Permalink
fix(): show error when using height in Drawer
Browse files Browse the repository at this point in the history
BREAKING CHANGE

drawer: `[width]` and `[height]` is deprecated

Rename from `[width]` to `[drawerWidth]` and from `[height]` to `[drawerHeight]`.

More info [here](http://alyle.io/guides/migrating-to-alyle-ui-3)
  • Loading branch information
Enlcxx committed Jan 23, 2020
1 parent 7fa41bc commit 1f5a8fa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib/drawer/drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,18 @@ export class LyDrawer implements OnChanges, AfterViewInit, OnDestroy {

@ViewChild(TemplateRef, { static: false }) _backdrop: TemplateRef<any>;

@Input()
set width(_val: string) {
console.log(LyDrawer.и, this._el.nativeElement);
throw new Error(`${LyDrawer.и}: [width] is deprecated instead use [drawerWidth].`);
}

@Input()
set height(_val: string) {
console.log(LyDrawer.и, this._el.nativeElement);
throw new Error(`${LyDrawer.и}: [height] is deprecated instead use [drawerHeight].`);
}

@Input()
set opened(val: boolean) {
if (val !== this.opened) {
Expand Down

0 comments on commit 1f5a8fa

Please sign in to comment.