This repository was archived by the owner on May 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +26
-10
lines changed Expand file tree Collapse file tree 4 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -18,21 +18,27 @@ module.exports = {
18
18
}
19
19
```
20
20
21
- Next, create a CSS file in your ` static ` folder for your Tailwind styles. We've used ` static/ css/tailwind.css` for this example:
21
+ Next, create a CSS file for your Tailwind styles. We've used ` css/tailwind.css ` for this example:
22
22
23
23
``` css
24
24
@import " tailwindcss/base" ;
25
25
@import " tailwindcss/components" ;
26
26
@import " tailwindcss/utilities" ;
27
27
```
28
28
29
- Finally, import your CSS in your main layout component. Here we're using ` components/Layout.js ` :
29
+ Finally, import your CSS in your ` _app.js ` component to make them available globally :
30
30
31
31
``` jsx
32
- import ' ../static/css/tailwind.css'
32
+ import React from ' react'
33
+ import App from ' next/app'
34
+ import ' ../css/tailwind.css'
35
+
36
+ class MyApp extends App {
37
+ render () {
38
+ const { Component , pageProps } = this .props
39
+ return < Component {... pageProps} / >
40
+ }
41
+ }
33
42
34
- export default ({ children }) => (
35
- < div>
36
- // ...
37
- < / div>
38
- )
43
+ export default MyApp
44
+ ```
Original file line number Diff line number Diff line change 1
- import '../static/css/tailwind.css'
2
-
3
1
export default ( { children } ) => {
4
2
return (
5
3
< div className = "antialiased text-gray-900 flex items-center justify-center min-h-screen" >
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+ import App from 'next/app'
3
+ import '../css/tailwind.css'
4
+
5
+ class MyApp extends App {
6
+ render ( ) {
7
+ const { Component, pageProps } = this . props
8
+ return < Component { ...pageProps } />
9
+ }
10
+ }
11
+
12
+ export default MyApp
You can’t perform that action at this time.
0 commit comments