Skip to content

Commit bbb95a2

Browse files
committed
Upgrade Tailwind
1 parent ab9c501 commit bbb95a2

File tree

8 files changed

+467
-335
lines changed

8 files changed

+467
-335
lines changed

eslint.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// @ts-check
2+
import {dirname} from 'path';
3+
import {fileURLToPath} from 'url';
24

35
import eslint from '@eslint/js';
46
import eslintTS from 'typescript-eslint';
@@ -40,6 +42,9 @@ export default [
4042
react: {
4143
version: 'detect',
4244
},
45+
tailwindcss: {
46+
config: dirname(fileURLToPath(import.meta.url)) + '/src/lib/index.css',
47+
},
4348
},
4449
plugins: {
4550
import: pluginImport,

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"@storybook/addon-links": "9.0.18",
6767
"@storybook/builder-vite": "9.0.18",
6868
"@storybook/react-vite": "9.0.18",
69+
"@tailwindcss/postcss": "4.1.11",
6970
"@testing-library/jest-dom": "6.6.3",
7071
"@testing-library/react": "16.3.0",
7172
"@types/jest": "30.0.0",
@@ -86,7 +87,7 @@
8687
"eslint-plugin-react-refresh": "0.4.20",
8788
"eslint-plugin-ssr-friendly": "1.3.0",
8889
"eslint-plugin-storybook": "9.0.18",
89-
"eslint-plugin-tailwindcss": "3.18.2",
90+
"eslint-plugin-tailwindcss": "4.0.0-beta.0",
9091
"generate-react-cli": "8.4.9",
9192
"husky": "9.1.7",
9293
"identity-obj-proxy": "3.0.0",
@@ -106,7 +107,7 @@
106107
"stylelint-config-standard": "38.0.0",
107108
"stylelint-order": "7.0.0",
108109
"stylelint-prettier": "5.0.3",
109-
"tailwindcss": "3.4.17",
110+
"tailwindcss": "4.1.10",
110111
"ts-jest": "29.4.0",
111112
"ts-node": "10.9.2",
112113
"typescript": "5.8.3",
@@ -116,6 +117,7 @@
116117
},
117118
"pnpm": {
118119
"onlyBuiltDependencies": [
120+
"@tailwindcss/oxide",
119121
"esbuild",
120122
"unrs-resolver"
121123
]

pnpm-lock.yaml

Lines changed: 453 additions & 316 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default {
22
plugins: {
3-
tailwindcss: {},
3+
'@tailwindcss/postcss': {},
44
'postcss-preset-env': {},
55
},
66
};

src/lib/CounterDemo/Counter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const Counter: FC<Props> = ({initialValue = 0}) => {
2323
<div className="w-60 border border-slate-300 p-6 text-center">
2424
<h2 className="mb-3 text-2xl">Counter</h2>
2525
<button
26-
className="mb-6 rounded-lg bg-teal-600 px-6 py-3 text-base text-white drop-shadow-md active:relative active:left-0.5 active:top-0.5 active:drop-shadow-none"
26+
className="mb-6 rounded-lg bg-teal-600 px-6 py-3 text-base text-white drop-shadow-md active:relative active:top-0.5 active:left-0.5 active:drop-shadow-none"
2727
type="button"
2828
onClick={incrementCount}>
2929
Increment by one

src/lib/CounterDemo/__snapshots__/Counter.spec.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`lib > Counter renders without crashing 1`] = `
44
<DocumentFragment>
@@ -11,7 +11,7 @@ exports[`lib > Counter renders without crashing 1`] = `
1111
Counter
1212
</h2>
1313
<button
14-
class="mb-6 rounded-lg bg-teal-600 px-6 py-3 text-base text-white drop-shadow-md active:relative active:left-0.5 active:top-0.5 active:drop-shadow-none"
14+
class="mb-6 rounded-lg bg-teal-600 px-6 py-3 text-base text-white drop-shadow-md active:relative active:top-0.5 active:left-0.5 active:drop-shadow-none"
1515
type="button"
1616
>
1717
Increment by one

src/lib/index.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import url("tailwindcss");

tailwind.config.js

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

0 commit comments

Comments
 (0)