Skip to content

Commit 340ea1b

Browse files
committed
Switch to new component variants API
1 parent 66f8666 commit 340ea1b

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"prepare": "node scripts/build.js"
1515
},
1616
"peerDependencies": {
17-
"tailwindcss": "^1.0"
17+
"tailwindcss": "^1.5.0"
1818
},
1919
"devDependencies": {
2020
"@mdx-js/loader": "^1.0.19",
@@ -29,6 +29,6 @@
2929
"postcss": "^7.0.17",
3030
"react": "^16.8.6",
3131
"react-dom": "^16.8.6",
32-
"tailwindcss": "^1.4.6"
32+
"tailwindcss": "^1.5"
3333
}
3434
}

Diff for: src/index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ module.exports = plugin.withOptions(
2222
return function ({ addComponents, theme, variants }) {
2323
const config = theme('typography', {})
2424

25-
addComponents({
26-
[`@variants ${variants('typography').join(', ')}`]: [
25+
addComponents(
26+
[
2727
{
2828
'.prose': merge(...castArray(styles.default.css), configToCss(config.default || {})),
2929
},
@@ -39,7 +39,8 @@ module.exports = plugin.withOptions(
3939
[`.prose-${modifier}`]: configToCss(config[modifier]),
4040
})),
4141
],
42-
})
42+
variants('typography')
43+
)
4344
}
4445
},
4546
() => ({ variants: { typography: ['responsive'] } })

Diff for: yarn.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -1917,7 +1917,7 @@ chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2:
19171917
escape-string-regexp "^1.0.5"
19181918
supports-color "^5.3.0"
19191919

1920-
chalk@^4.0.0:
1920+
"chalk@^3.0.0 || ^4.0.0":
19211921
version "4.1.0"
19221922
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
19231923
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
@@ -5807,16 +5807,16 @@ svgo@^1.0.0:
58075807
unquote "~1.1.1"
58085808
util.promisify "~1.0.0"
58095809

5810-
tailwindcss@^1.4.6:
5811-
version "1.4.6"
5812-
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-1.4.6.tgz#17b37166ccda08d7e7f9ca995ea48ce1e0089700"
5813-
integrity sha512-qV0qInUq1FWih39Bc5CWECdgObSzRrbjGD4ke4kAPSIq6WXrPhv0wwOcUWJgJ66ltT9j+XnSRYikG8WNRU/fTQ==
5810+
tailwindcss@^1.5:
5811+
version "1.5.0"
5812+
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-1.5.0.tgz#c36bd1574db70499b1f582a305a945defb704df0"
5813+
integrity sha512-c2l1rXfePM7PR6SPwDYDrKoejhl0LAbiBaX51EVz3nadk3oJ4FpbHGik9Nsb9GAafZRfZ0bIXlFsVjVIubrqiQ==
58145814
dependencies:
58155815
"@fullhuman/postcss-purgecss" "^2.1.2"
58165816
autoprefixer "^9.4.5"
58175817
browserslist "^4.12.0"
58185818
bytes "^3.0.0"
5819-
chalk "^4.0.0"
5819+
chalk "^3.0.0 || ^4.0.0"
58205820
color "^3.1.2"
58215821
detective "^5.2.0"
58225822
fs-extra "^8.0.0"

0 commit comments

Comments
 (0)