From bed2f10164e16ace411ad14da194c31918f44a3d Mon Sep 17 00:00:00 2001 From: Luca Schneider Date: Wed, 18 Dec 2024 16:42:58 +0100 Subject: [PATCH] Add some more tests --- .../runtime/__tests__/cssPropTest.tsx | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/packages/next-yak/runtime/__tests__/cssPropTest.tsx b/packages/next-yak/runtime/__tests__/cssPropTest.tsx index 886dbcd2..3d0e8dd0 100644 --- a/packages/next-yak/runtime/__tests__/cssPropTest.tsx +++ b/packages/next-yak/runtime/__tests__/cssPropTest.tsx @@ -136,3 +136,36 @@ const ComponentWithDynamicCSSVarsButWithoutOwnProps = () => { /> ); }; + +const ComponentWithDynamicCSSWithOwnPropsShouldGenerateTypeError = () => { + return ( +
` + padding: ${({ $primary }) => $primary && "20px"}; + `} + /> + ); +}; + +const dynamicMixin = css<{ $primary: boolean }>` + ${({ $primary }) => + $primary && + css` + font-size: 1.7rem; + `} +`; + +const ComponentWithCSSThatUsesDynamicMixinWithOwnPropsShouldGenerateTypeError = + () => { + return ( +
+ ); + };