-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react): fix tailwind for react library and component (#29319)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #27954
- Loading branch information
Showing
17 changed files
with
838 additions
and
3 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
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
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
471 changes: 471 additions & 0 deletions
471
packages/next/src/generators/application/__snapshots__/application.spec.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
81 changes: 81 additions & 0 deletions
81
packages/react/src/generators/component/__snapshots__/component.spec.ts.snap
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,81 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`component --style @emotion/styled should use @emotion/styled as the styled API library 1`] = ` | ||
"import styled from '@emotion/styled'; | ||
const StyledHello = styled.div\` | ||
color: pink; | ||
\`; | ||
export function Hello() { | ||
return ( | ||
<StyledHello> | ||
<h1>Welcome to Hello!</h1> | ||
</StyledHello> | ||
); | ||
} | ||
export default Hello; | ||
" | ||
`; | ||
|
||
exports[`component --style none should generate component files without styles 1`] = ` | ||
"export function Hello() { | ||
return ( | ||
<div> | ||
<h1>Welcome to Hello!</h1> | ||
</div> | ||
); | ||
} | ||
export default Hello; | ||
" | ||
`; | ||
|
||
exports[`component --style styled-components should use styled-components as the styled API library 1`] = ` | ||
"import styled from 'styled-components'; | ||
const StyledHello = styled.div\` | ||
color: pink; | ||
\`; | ||
export function Hello() { | ||
return ( | ||
<StyledHello> | ||
<h1>Welcome to Hello!</h1> | ||
</StyledHello> | ||
); | ||
} | ||
export default Hello; | ||
" | ||
`; | ||
|
||
exports[`component --style styled-jsx should use styled-jsx as the styled API library 1`] = ` | ||
"export function Hello() { | ||
return ( | ||
<div> | ||
<style jsx>{\` | ||
div { | ||
color: pink; | ||
} | ||
\`}</style>{' '} | ||
<h1>Welcome to Hello!</h1> | ||
</div> | ||
); | ||
} | ||
export default Hello; | ||
" | ||
`; | ||
exports[`component --style tailwind should not generate any style in component 1`] = ` | ||
"export function Hello() { | ||
return ( | ||
<div className={styles['container']}> | ||
<h1>Welcome to Hello!</h1> | ||
</div> | ||
); | ||
} | ||
export default Hello; | ||
" | ||
`; |
Oops, something went wrong.