Fix tailwind config in the best practice way

This commit is contained in:
aronmal 2023-02-12 17:59:12 +01:00
parent 38f6d5eca9
commit d86bf88e55
Signed by: aronmal
GPG key ID: 816B7707426FC612

View file

@ -1,21 +1,4 @@
/** @type {import('tailwindcss').Config} */
const allColors = require("tailwindcss/colors")
const colors = Object.keys(allColors)
.filter((key) => {
const deprecated = [
"lightBlue",
"warmGray",
"trueGray",
"coolGray",
"blueGray",
]
return !deprecated.find((val) => val === key)
})
.reduce((acc, key) => {
acc[key] = allColors[key]
return acc
}, {})
module.exports = {
content: [
@ -23,8 +6,8 @@ module.exports = {
"./components/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
colors: {
...colors,
theme: "#282c34",
grayish: "#b1b2b5cc",
warn: "#fabd04",
@ -32,7 +15,7 @@ module.exports = {
"shield-gray": "#616161",
"shield-lightgray": "#989898",
},
extend: {},
},
},
plugins: [],
}