-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix css prop in exported component (#253)
- Loading branch information
Showing
5 changed files
with
55 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"next-yak": patch | ||
"yak-swc": patch | ||
--- | ||
|
||
Fix issue with the css prop where it wouldn't be generated when used inside an exported component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/yak-swc/yak_swc/tests/fixture/css-prop-in-exported-component/input.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { css } from "next-yak"; | ||
|
||
export const YakLogo = () => ( | ||
<div | ||
css={css` | ||
display: flex; | ||
gap: 6px; | ||
`} | ||
> | ||
Yak | ||
</div> | ||
); |
10 changes: 10 additions & 0 deletions
10
packages/yak-swc/yak_swc/tests/fixture/css-prop-in-exported-component/output.dev.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { css, __yak_mergeCssProp } from "next-yak/internal"; | ||
import __styleYak from "./input.yak.module.css!=!./input?./input.yak.module.css"; | ||
export const YakLogo = ()=><div {.../*YAK Extracted CSS: | ||
.YakLogo { | ||
display: flex; | ||
gap: 6px; | ||
} | ||
*/ /*#__PURE__*/ css(__styleYak.YakLogo)({})}> | ||
Yak | ||
</div>; |
10 changes: 10 additions & 0 deletions
10
packages/yak-swc/yak_swc/tests/fixture/css-prop-in-exported-component/output.prod.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { css, __yak_mergeCssProp } from "next-yak/internal"; | ||
import __styleYak from "./input.yak.module.css!=!./input?./input.yak.module.css"; | ||
export const YakLogo = ()=><div {.../*YAK Extracted CSS: | ||
.YakLogo { | ||
display: flex; | ||
gap: 6px; | ||
} | ||
*/ /*#__PURE__*/ css(__styleYak.YakLogo)({})}> | ||
Yak | ||
</div>; |