Skip to content

Commit 33914a5

Browse files
committed
Update config for tailwind
1 parent 514206b commit 33914a5

8 files changed

+257
-174
lines changed

package-lock.json

+242-132
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@
1717
"react": "17.0.2",
1818
"react-dom": "17.0.2",
1919
"react-hot-toast": "^2.1.1",
20-
"react-simple-code-editor": "^0.11.0",
21-
"tailwindcss": "^3.0.15"
20+
"react-simple-code-editor": "^0.11.0"
2221
},
2322
"devDependencies": {
2423
"@types/react": "17.0.30",
2524
"@typescript-eslint/eslint-plugin": "^5.1.0",
2625
"@typescript-eslint/parser": "^5.1.0",
27-
"autoprefixer": "^10.3.7",
26+
"autoprefixer": "^10.4.2",
2827
"eslint": "^7.32.0",
2928
"eslint-config-airbnb": "^18.2.1",
3029
"eslint-config-next": "11.1.2",
3130
"eslint-plugin-import": "^2.25.2",
3231
"eslint-plugin-jsx-a11y": "^6.4.1",
3332
"eslint-plugin-react": "^7.26.1",
3433
"eslint-plugin-react-hooks": "^4.2.0",
35-
"postcss": "^8.3.9",
34+
"postcss": "^8.4.5",
35+
"tailwindcss": "^3.0.15",
3636
"typescript": "4.4.4"
3737
}
3838
}

pages/_app.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { AppProps } from 'next/app';
2-
import 'tailwindcss/tailwind.css';
2+
import '../styles/global.css';
33

44
function MyApp({ Component, pageProps }: AppProps) {
55
return <Component {...pageProps} />;

pages/api/detect.ts

-20
This file was deleted.

pages/index.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import {
77
XIcon,
88
MailIcon,
99
} from '@heroicons/react/outline';
10-
import axios from 'axios';
1110
import CodeEditor from '../components/CodeEditor';
1211
import Output from '../components/Output';
13-
import { LanguagePrediction } from './api/detect';
1412

1513
const navigation = [
1614
{ name: 'Documentation', href: 'https://nicedoc.io/mintlify/inferapp', current: false },
@@ -75,9 +73,7 @@ export default function Example() {
7573
if (newCode.length < 40) {
7674
setOutputDisplay(`You need to add another ${40 - newCode.length} characters to detect`);
7775
} else {
78-
const detectedResponse = await axios.post('/api/detect', { code: newCode });
79-
const detected = detectedResponse.data as LanguagePrediction;
80-
const detectedLanguage = detected.language || '';
76+
const detectedLanguage = '';
8177
setOutputDisplay(detectedLanguage);
8278
}
8379
};
@@ -94,7 +90,7 @@ export default function Example() {
9490
)}
9591
>
9692
<div className="max-w-7xl mx-auto px-2 sm:px-4 lg:px-8">
97-
<div className="relative h-16 flex items-center justify-between lg:border-b lg:border-sky-800">
93+
<div className="relative h-16 flex items-center justify-between">
9894
<div className="px-2 flex items-center lg:px-0">
9995
<div className="flex-shrink-0">
10096
<div className="h-7 w-7">

postcss.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ module.exports = {
33
tailwindcss: {},
44
autoprefixer: {},
55
},
6-
}
6+
};

styles/global.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

tailwind.config.js

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
module.exports = {
2-
purge: [],
3-
darkMode: false, // or 'media' or 'class'
2+
content: [
3+
'./pages/**/*.{js,ts,jsx,tsx}',
4+
'./components/**/*.{js,ts,jsx,tsx}',
5+
],
46
theme: {
5-
extend: {
6-
colors: {
7-
primary: '#0c8c5e',
8-
secondary: '#18e299',
9-
},
10-
},
11-
},
12-
variants: {
137
extend: {},
148
},
159
plugins: [],

0 commit comments

Comments
 (0)