-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
43 lines (39 loc) · 909 Bytes
/
tailwind.config.js
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
const generateColorClass = (variable) => {
return ({ opacityValue }) =>
opacityValue
? `rgba(var(--${variable}), ${opacityValue})`
: `rgb(var(--${variable}))`
}
const textColor = {
primary: generateColorClass('text-primary'),
}
const backgroundColor = {
primary: generateColorClass('bg-primary'),
secondary: generateColorClass('bg-secondary'),
tertiary: generateColorClass('bg-tertiary'),
}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
textColor,
backgroundColor,
colors: {
primary: generateColorClass('primary'),
bg: {
...backgroundColor
},
text: {
...textColor
},
},
},
},
plugins: [
require('tailwind-scrollbar')({ nocompatible: true }),
require('@tailwindcss/typography'),
],
}