diff --git a/types/styled-system/dist/util.d.ts b/types/styled-system/dist/util.d.ts index 445bb81567..8fa2642e62 100644 --- a/types/styled-system/dist/util.d.ts +++ b/types/styled-system/dist/util.d.ts @@ -12,7 +12,7 @@ export function merge(a: any, b: any): any; export function compose(...funcs: Array<(...args: any[]) => any>): (...args: any[]) => any; -export function createMediaQuery(n: string): string; +export function createMediaQuery(n: any): string; export interface LowLevelStylefunctionArguments { prop: string; diff --git a/types/styled-system/index.d.ts b/types/styled-system/index.d.ts index 2511fbb99c..4eaf0e8a84 100644 --- a/types/styled-system/index.d.ts +++ b/types/styled-system/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for styled-system 3.0 +// Type definitions for styled-system 3.1 // Project: https://github.com/jxnblk/styled-system#readme // Definitions by: Marshall Bowers // Ben McCormick @@ -11,16 +11,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import * as util from './dist/util'; - -export { util }; -export { - style, - themeGet, - merge, - compose, -} from './dist/util'; - +export * from './dist/util'; export * from './dist/styles'; export * from './dist/variant'; export * from './dist/mixed'; diff --git a/types/styled-system/styled-system-tests.tsx b/types/styled-system/styled-system-tests.tsx index 756dd0c039..4608aeebec 100644 --- a/types/styled-system/styled-system-tests.tsx +++ b/types/styled-system/styled-system-tests.tsx @@ -122,12 +122,20 @@ import { ButtonStyleProps, MixedProps, VerticalAlignProps, - verticalAlign + verticalAlign, + px, + createMediaQuery } from "styled-system"; // tslint:disable-next-line:strict-export-declare-modifiers declare const styled: (...props: any[]) => React.ComponentType; +const breakpoints = [480, 960]; + +const breakpointsPx = breakpoints.map(px); + +const mediaQueries = breakpoints.map(createMediaQuery); + const boxStyle = variant({ prop: 'boxStyle', key: 'box',