1
0
Files
yel-dspace-angular/src/app/shared/mocks/mock-host-window-service.ts
2018-08-29 15:12:01 +02:00

24 lines
410 B
TypeScript

import {of as observableOf, Observable } from 'rxjs';
// declare a stub service
export class MockHostWindowService {
private width: number;
constructor(width) {
this.setWidth(width);
}
setWidth(width) {
this.width = width;
}
isXs(): Observable<boolean> {
return observableOf(this.width < 576);
}
isSm(): Observable<boolean> {
return observableOf(this.width < 768);
}
}