From bf27bf7455ea59a5ea89a37d366a540edbfed426 Mon Sep 17 00:00:00 2001 From: Erin Noe-Payne Date: Fri, 15 Mar 2019 15:28:13 -0600 Subject: [PATCH 1/2] Adds support for @rebass/grid/emotion --- types/rebass__grid/emotion.d.ts | 1 + types/rebass__grid/index.d.ts | 1 + types/rebass__grid/rebass__grid-tests.tsx | 9 +++++++++ types/rebass__grid/tsconfig.json | 4 +++- 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 types/rebass__grid/emotion.d.ts diff --git a/types/rebass__grid/emotion.d.ts b/types/rebass__grid/emotion.d.ts new file mode 100644 index 0000000000..34c6161062 --- /dev/null +++ b/types/rebass__grid/emotion.d.ts @@ -0,0 +1 @@ +export * from './index' \ No newline at end of file diff --git a/types/rebass__grid/index.d.ts b/types/rebass__grid/index.d.ts index 3f5012851f..918004bfca 100644 --- a/types/rebass__grid/index.d.ts +++ b/types/rebass__grid/index.d.ts @@ -4,6 +4,7 @@ // Victor Orlov // Louis Hache // Adam Lavin +// Erin Noe-Payne // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.9 diff --git a/types/rebass__grid/rebass__grid-tests.tsx b/types/rebass__grid/rebass__grid-tests.tsx index 147f3ff084..562091952b 100644 --- a/types/rebass__grid/rebass__grid-tests.tsx +++ b/types/rebass__grid/rebass__grid-tests.tsx @@ -1,6 +1,7 @@ import * as React from "react"; import { Flex, Box } from "@rebass/grid"; import { css } from "styled-components"; +import * as Emotion from "@rebass/grid/emotion"; const Layout = () => ( @@ -9,3 +10,11 @@ const Layout = () => ( ); const cssTest = ; + +const EmotionLayout = () => ( + + + +); + +const emotionCssTest = ; diff --git a/types/rebass__grid/tsconfig.json b/types/rebass__grid/tsconfig.json index 419413e066..b2c3ecb0e5 100644 --- a/types/rebass__grid/tsconfig.json +++ b/types/rebass__grid/tsconfig.json @@ -14,7 +14,8 @@ "../" ], "paths": { - "@rebass/grid": ["rebass__grid"] + "@rebass/grid": ["rebass__grid"], + "@rebass/grid/emotion": ["rebass__grid/emotion"] }, "types": [], "noEmit": true, @@ -23,6 +24,7 @@ }, "files": [ "index.d.ts", + "emotion.d.ts", "rebass__grid-tests.tsx" ] } \ No newline at end of file From 75d4c428e2e4e5c7f730eda398f4c5c7d436a579 Mon Sep 17 00:00:00 2001 From: Erin Noe-Payne Date: Tue, 26 Mar 2019 16:59:59 -0600 Subject: [PATCH 2/2] passes tests --- types/rebass__grid/emotion.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/rebass__grid/emotion.d.ts b/types/rebass__grid/emotion.d.ts index 34c6161062..ea465c2a34 100644 --- a/types/rebass__grid/emotion.d.ts +++ b/types/rebass__grid/emotion.d.ts @@ -1 +1 @@ -export * from './index' \ No newline at end of file +export * from './index';