-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add labels for function declarations (#1240)
* Add labels for function declarations * Change behaviour * Add more tests
- Loading branch information
Showing
8 changed files
with
293 additions
and
20 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
packages/babel-plugin-emotion/__tests__/__fixtures__/function-declaration.js
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,13 @@ | ||
// @flow | ||
import * as React from 'react' | ||
import { jsx } from '@emotion/core' | ||
|
||
function Logo(props) { | ||
return ( | ||
<a | ||
css={{ | ||
display: 'block' | ||
}} | ||
/> | ||
) | ||
} |
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
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
7 changes: 7 additions & 0 deletions
7
.../babel-plugin-emotion/__tests__/css-macro/__fixtures__/inside-anonymous-arrow-function.js
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,7 @@ | ||
import css from '@emotion/css/macro' | ||
|
||
export default () => { | ||
css` | ||
color: hotpink; | ||
` | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/inside-anonymous-function.js
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,7 @@ | ||
import css from '@emotion/css/macro' | ||
|
||
export default () => { | ||
css` | ||
color: hotpink; | ||
` | ||
} |
7 changes: 7 additions & 0 deletions
7
...-plugin-emotion/__tests__/css-macro/__fixtures__/inside-non-pascal-case-arrow-function.js
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,7 @@ | ||
import css from '@emotion/css/macro' | ||
|
||
let something = () => { | ||
css` | ||
color: hotpink; | ||
` | ||
} |
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
Oops, something went wrong.