Comparing version 0.2.0 to 0.2.1
@@ -1,9 +0,9 @@ | ||
import { ScreenType } from "./screen-type"; | ||
import { ScreenData } from "./screen-data"; | ||
import { WindowWidthType } from "./window-width-type"; | ||
import { WindowData } from "./window-data"; | ||
export declare class Horizontal { | ||
private static defaults; | ||
static getData(): ScreenData; | ||
static getType(width?: number): ScreenType; | ||
static getData(): WindowData; | ||
static getType(width?: number): WindowWidthType; | ||
static setDefaults(xs: number, sm: number, md: number): void; | ||
static getWidth(): any; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var screen_type_1 = require("./screen-type"); | ||
var window_width_type_1 = require("./window-width-type"); | ||
var Horizontal = /** @class */ (function () { | ||
@@ -11,3 +11,3 @@ function Horizontal() { | ||
width: width, | ||
screenType: this.getType(width) | ||
widthType: this.getType(width) | ||
}; | ||
@@ -21,13 +21,13 @@ }; | ||
if (width < this.defaults.screenType.xs) { | ||
return screen_type_1.ScreenType.XS; | ||
return window_width_type_1.WindowWidthType.XS; | ||
} | ||
// @ts-ignore | ||
else if (width < this.defaults.screenType.sm) { | ||
return screen_type_1.ScreenType.SM; | ||
return window_width_type_1.WindowWidthType.SM; | ||
} | ||
// @ts-ignore | ||
else if (width < this.defaults.screenType.md) { | ||
return screen_type_1.ScreenType.MD; | ||
return window_width_type_1.WindowWidthType.MD; | ||
} | ||
return screen_type_1.ScreenType.LG; | ||
return window_width_type_1.WindowWidthType.LG; | ||
}; | ||
@@ -34,0 +34,0 @@ Horizontal.setDefaults = function (xs, sm, md) { |
export { Horizontal } from './horizontal'; | ||
export { ScreenData } from './screen-data'; | ||
export { ScreenType } from './screen-type'; | ||
export { WindowData } from './window-data'; | ||
export { WindowWidthType } from './window-width-type'; |
@@ -5,3 +5,3 @@ "use strict"; | ||
exports.Horizontal = horizontal_1.Horizontal; | ||
var screen_type_1 = require("./screen-type"); | ||
exports.ScreenType = screen_type_1.ScreenType; | ||
var window_width_type_1 = require("./window-width-type"); | ||
exports.WindowWidthType = window_width_type_1.WindowWidthType; |
{ | ||
"name": "horizontal", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A package that analyze and gives information about browser width such as screen type (XS, SM, MD, LG)", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
7038