Skip to content

Commit

Permalink
feat: add correct types for createStyledBreakpointsTheme
Browse files Browse the repository at this point in the history
  • Loading branch information
mg901 committed May 11, 2023
1 parent 5e96ec1 commit 86fe548
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
type Orientation = 'portrait' | 'landscape';
export type Breakpoints = Record<string, `${string}px`>;

export type Options = {
breakpoints?: Breakpoints;
errorPrefix?: string;
};

declare enum DefaultBreakpoints {
xs = 'xs',
sm = 'sm',
Expand Down Expand Up @@ -36,7 +31,11 @@ export interface DefaultStyledBreakpointsTheme {
};
}

declare function createStyledBreakpointsTheme({
breakpoints,
errorPrefix,
}: Options): DefaultStyledBreakpointsTheme;
interface Options {
breakpoints?: Breakpoints;
errorPrefix?: string;
}

declare function createStyledBreakpointsTheme(
options: Options
): DefaultStyledBreakpointsTheme;

0 comments on commit 86fe548

Please sign in to comment.