-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind-preset.cjs
46 lines (45 loc) · 1.11 KB
/
tailwind-preset.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const colors = require('tailwindcss/colors.js');
/**
* @param {Object} [options] - Options for the preset
* @param {Array<string>} [options.content] - Glob pattern matching files where tailwindcss classes are used
* @returns {import('tailwindcss').Config} Tailwind Config
*/
module.exports = ({content = []} = {}) => ({
mode: 'jit',
content: [
// eslint-disable-next-line unicorn/prefer-string-replace-all -- too new
`${__dirname
.replace(/^.*[/\\]node_modules[/\\]/u, './node_modules/')
.replace(/\\/gu, '/')}/dist/**/*.{js,cjs,mjs,jsx,ts,tsx,mts,cts}`,
...content,
],
darkMode: 'class',
theme: {
extend: {
minHeight: {
9: '2.25rem',
},
colors: {
primary: colors.orange,
links: {
DEFAULT: 'blue',
dark: 'green',
},
headings: {
DEFAULT: 'purple',
dark: 'teal',
},
good: colors.green,
bad: colors.red,
caution: colors.yellow,
neutral: colors.blue,
},
},
},
variants: {
extend: {
invert: ['dark'],
},
},
plugins: [],
});