From 1a092b0b221986a65fedecdcb501e4e34ebc8aab Mon Sep 17 00:00:00 2001 From: okampfer Date: Sat, 25 Aug 2018 11:30:55 +0800 Subject: [PATCH] Update styled-jsx/css typings, add tests for methods css.global and css.resolve --- types/styled-jsx/styled-jsx-tests.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/types/styled-jsx/styled-jsx-tests.tsx b/types/styled-jsx/styled-jsx-tests.tsx index 09883d8df6..d1b9033966 100644 --- a/types/styled-jsx/styled-jsx-tests.tsx +++ b/types/styled-jsx/styled-jsx-tests.tsx @@ -26,6 +26,29 @@ const withSeparatedCSS = ( ); +const globalCSS = css.global`body { margin: 0; }`; +const withGlobalCSS = ( +
+ +
+); + +const resolvedCSS = css.resolve`a { color: green; }`; +const withResolvedCSS = ( +
+ + {resolvedCSS.styles} +
+); + +const dynamicResolvedCSS = css.resolve`a { color: ${buttonColor}; }`; +const withDynamicResolvedCSS = ( +
+ + {dynamicResolvedCSS.styles} +
+); + const stylesChildren = flushToReact(); const jsxToRender = ( { stylesChildren }