-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test basic css module prefetching without compose
- Loading branch information
Showing
6 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
test/integration/css-fixtures/next-issue-12343/components/button.jsx
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,5 @@ | ||
import styles from './button.module.css' | ||
|
||
export const Button = ({ className, ...rest }) => ( | ||
<a className={`${styles.button} ${className}`} {...rest} /> | ||
) |
3 changes: 3 additions & 0 deletions
3
test/integration/css-fixtures/next-issue-12343/components/button.module.css
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,3 @@ | ||
.button { | ||
background: hotpink; | ||
} |
15 changes: 15 additions & 0 deletions
15
test/integration/css-fixtures/next-issue-12343/pages/another-page.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,15 @@ | ||
import { Button } from '../components/button' | ||
import Link from 'next/link' | ||
|
||
function AnotherPage() { | ||
return ( | ||
<div> | ||
<h1>Another page</h1> | ||
<Link href="/"> | ||
<Button id="link-index">Another Button instance</Button> | ||
</Link> | ||
</div> | ||
) | ||
} | ||
|
||
export default AnotherPage |
3 changes: 3 additions & 0 deletions
3
test/integration/css-fixtures/next-issue-12343/pages/homepage.module.css
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,3 @@ | ||
.button { | ||
background: lime; | ||
} |
18 changes: 18 additions & 0 deletions
18
test/integration/css-fixtures/next-issue-12343/pages/index.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,18 @@ | ||
import Link from 'next/link' | ||
import { Button } from '../components/button' | ||
import styles from './homepage.module.css' | ||
|
||
function HomePage() { | ||
return ( | ||
<div> | ||
<h1>Home page</h1> | ||
<Link href="/another-page"> | ||
<Button id="link-other" className={styles.button}> | ||
Another page | ||
</Button> | ||
</Link> | ||
</div> | ||
) | ||
} | ||
|
||
export default HomePage |
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