mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-05 01:30:17 +00:00
Merge pull request #34035 from autoric/master
Adds support for @rebass/grid/emotion
This commit is contained in:
1
types/rebass__grid/emotion.d.ts
vendored
Normal file
1
types/rebass__grid/emotion.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from './index';
|
||||
1
types/rebass__grid/index.d.ts
vendored
1
types/rebass__grid/index.d.ts
vendored
@@ -4,6 +4,7 @@
|
||||
// Victor Orlov <https://github.com/vittorio>
|
||||
// Louis Hache <https://github.com/lhache>
|
||||
// Adam Lavin <https://github.com/lavoaster>
|
||||
// Erin Noe-Payne <https://github.com/autoric>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.9
|
||||
|
||||
|
||||
@@ -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 = () => (
|
||||
<Flex m={4}>
|
||||
@@ -9,3 +10,11 @@ const Layout = () => (
|
||||
);
|
||||
|
||||
const cssTest = <Flex css='background: transparent;'><Box css={css`${{color: 'inherit'}}`}/></Flex>;
|
||||
|
||||
const EmotionLayout = () => (
|
||||
<Emotion.Flex m={4}>
|
||||
<Emotion.Box px={3} py={2} />
|
||||
</Emotion.Flex>
|
||||
);
|
||||
|
||||
const emotionCssTest = <Emotion.Flex css='background: transparent;'><Emotion.Box css={css`${{color: 'inherit'}}`}/></Emotion.Flex>;
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user