Skip to content

Commit e53f7cc

Browse files
committed
refactor: create IWindowSizing interface
1 parent ecf0105 commit e53f7cc

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
export interface IWindowSizing {
3+
compact: string
4+
medium: string
5+
expanded: string
6+
large: string
7+
extraLarge: string
8+
}

src/media-queries/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
export * from './internal/window-media-query';
12
export * from './provide-window-media-query';
2-
export * from './window-media-query';
33

src/media-queries/window-media-query.ts renamed to src/media-queries/internal/window-media-query.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
import plugin from "tailwindcss/plugin";
2-
import type { IProvider } from "../declaration/provider.interface";
3-
import { Strings } from "../utils/strings";
2+
import type { IProvider } from "../../declaration/provider.interface";
3+
import type { IWindowSizing } from "../../declaration/window-sizing.interface";
4+
import { Strings } from "../../utils/strings";
45

5-
interface IWindowMediaQuery {
6-
compact: string
7-
medium: string
8-
expanded: string
9-
large: string
10-
extraLarge: string
11-
}
12-
13-
class DefaultWindowMediaQueryTokens implements IWindowMediaQuery {
6+
class DefaultWindowMediaQueryTokens implements IWindowSizing {
147
compact = '@media (max-width: 600px)'
158
medium = '@media (min-width: 600px) and (max-width: 840px)'
169
expanded = '@media (min-width: 840px) and (max-width: 1200px)'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { WindowMediaQueryProvider } from "./window-media-query";
1+
import { WindowMediaQueryProvider } from "./internal/window-media-query";
22

33
export const provideWindowMediaQuery = () => new WindowMediaQueryProvider()

0 commit comments

Comments
 (0)