Skip to content

Commit da64a2b

Browse files
author
Ganessh Kumar R P
committed
adding typescript and tailwindcss
1 parent 550ff9e commit da64a2b

File tree

12 files changed

+404
-210
lines changed

12 files changed

+404
-210
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) and configured to use typescript and tailwindcss.
22

33
## Getting Started
44

next-env.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/types/global" />

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11+
"autoprefixer": "^10.2.3",
1112
"next": "10.0.5",
13+
"postcss": "^8.2.4",
1214
"react": "17.0.1",
13-
"react-dom": "17.0.1"
15+
"react-dom": "17.0.1",
16+
"tailwindcss": "^2.0.2"
17+
},
18+
"devDependencies": {
19+
"@types/node": "^14.14.22",
20+
"@types/react": "^17.0.0",
21+
"typescript": "^4.1.3"
1422
}
1523
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import '../styles/globals.css'
22

3-
function MyApp({ Component, pageProps }) {
3+
function App({ Component, pageProps }: AppProps) {
44
return <Component {...pageProps} />
55
}
66

7-
export default MyApp
7+
export default App

pages/api/hello.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

pages/index.js

Lines changed: 0 additions & 65 deletions
This file was deleted.

pages/index.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Head from 'next/head'
2+
import styles from '../styles/Home.module.css'
3+
4+
const Home = (): JSX.Element => {
5+
return (
6+
<div className={styles.container}>
7+
<Head>
8+
<title>Create Next App</title>
9+
<link rel="icon" href="/favicon.ico" />
10+
</Head>
11+
12+
<div>Hello World</div>
13+
</div>
14+
)
15+
}
16+
17+
export default Home;

postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
}
6+
}

styles/Home.module.css

Lines changed: 0 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +0,0 @@
1-
.container {
2-
min-height: 100vh;
3-
padding: 0 0.5rem;
4-
display: flex;
5-
flex-direction: column;
6-
justify-content: center;
7-
align-items: center;
8-
}
9-
10-
.main {
11-
padding: 5rem 0;
12-
flex: 1;
13-
display: flex;
14-
flex-direction: column;
15-
justify-content: center;
16-
align-items: center;
17-
}
18-
19-
.footer {
20-
width: 100%;
21-
height: 100px;
22-
border-top: 1px solid #eaeaea;
23-
display: flex;
24-
justify-content: center;
25-
align-items: center;
26-
}
27-
28-
.footer img {
29-
margin-left: 0.5rem;
30-
}
31-
32-
.footer a {
33-
display: flex;
34-
justify-content: center;
35-
align-items: center;
36-
}
37-
38-
.title a {
39-
color: #0070f3;
40-
text-decoration: none;
41-
}
42-
43-
.title a:hover,
44-
.title a:focus,
45-
.title a:active {
46-
text-decoration: underline;
47-
}
48-
49-
.title {
50-
margin: 0;
51-
line-height: 1.15;
52-
font-size: 4rem;
53-
}
54-
55-
.title,
56-
.description {
57-
text-align: center;
58-
}
59-
60-
.description {
61-
line-height: 1.5;
62-
font-size: 1.5rem;
63-
}
64-
65-
.code {
66-
background: #fafafa;
67-
border-radius: 5px;
68-
padding: 0.75rem;
69-
font-size: 1.1rem;
70-
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
71-
Bitstream Vera Sans Mono, Courier New, monospace;
72-
}
73-
74-
.grid {
75-
display: flex;
76-
align-items: center;
77-
justify-content: center;
78-
flex-wrap: wrap;
79-
max-width: 800px;
80-
margin-top: 3rem;
81-
}
82-
83-
.card {
84-
margin: 1rem;
85-
flex-basis: 45%;
86-
padding: 1.5rem;
87-
text-align: left;
88-
color: inherit;
89-
text-decoration: none;
90-
border: 1px solid #eaeaea;
91-
border-radius: 10px;
92-
transition: color 0.15s ease, border-color 0.15s ease;
93-
}
94-
95-
.card:hover,
96-
.card:focus,
97-
.card:active {
98-
color: #0070f3;
99-
border-color: #0070f3;
100-
}
101-
102-
.card h3 {
103-
margin: 0 0 1rem 0;
104-
font-size: 1.5rem;
105-
}
106-
107-
.card p {
108-
margin: 0;
109-
font-size: 1.25rem;
110-
line-height: 1.5;
111-
}
112-
113-
.logo {
114-
height: 1em;
115-
}
116-
117-
@media (max-width: 600px) {
118-
.grid {
119-
width: 100%;
120-
flex-direction: column;
121-
}
122-
}

tailwind.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
purge: [],
3+
darkMode: false, // or 'media' or 'class'
4+
theme: {
5+
extend: {},
6+
},
7+
variants: {
8+
extend: {},
9+
},
10+
plugins: [],
11+
}

0 commit comments

Comments
 (0)