-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
154 lines (148 loc) · 4.13 KB
/
tailwind.config.ts
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import type { Config } from "tailwindcss";
const svgToDataUri = require("mini-svg-data-uri");
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");
const addVariablesForColors = ({ addBase, theme }: any) => {
const colors = theme("colors");
const cssVariables: { [key: string]: string } = Object.keys(colors).reduce(
(acc, color) => {
const value = colors[color];
if (typeof value === "string") {
acc[`--color-${color}`] = value;
} else {
Object.keys(value).forEach((shade) => {
acc[`--color-${color}-${shade}`] = value[shade];
});
}
return acc;
},
{} as { [key: string]: string }
);
addBase({
":root": {
...cssVariables,
},
});
};
const config = {
darkMode: ["class"],
content: [
"./pages/**/*.{ts,tsx}",
"./components/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
"./constants/**/*.{ts,tsx}",
],
prefix: "",
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
fill: {
1: "rgba(255, 255, 255, 0.10)",
},
bankGradient: "#0179FE",
indigo: {
500: "#6172F3",
700: "#3538CD",
},
success: {
25: "#F6FEF9",
50: "#ECFDF3",
100: "#D1FADF",
600: "#039855",
700: "#027A48",
900: "#054F31",
},
pink: {
25: "#FEF6FB",
100: "#FCE7F6",
500: "#EE46BC",
600: "#DD2590",
700: "#C11574",
900: "#851651",
},
blue: {
25: "#F5FAFF",
100: "#D1E9FF",
500: "#2E90FA",
600: "#1570EF",
700: "#175CD3",
900: "#194185",
},
sky: {
1: "#F3F9FF",
},
black: {
1: "#00214F",
2: "#344054",
},
gray: {
25: "#FCFCFD",
200: "#EAECF0",
300: "#D0D5DD",
500: "#667085",
600: "#475467",
700: "#344054",
900: "#101828",
},
},
backgroundImage: {
"bank-gradient": "linear-gradient(90deg, #0179FE 0%, #4893FF 100%)",
"gradient-mesh": "url('/icons/gradient-mesh.svg')",
"bank-green-gradient":
"linear-gradient(90deg, #01797A 0%, #489399 100%)",
},
boxShadow: {
form: "0px 1px 2px 0px rgba(16, 24, 40, 0.05)",
chart:
"0px 1px 3px 0px rgba(16, 24, 40, 0.10), 0px 1px 2px 0px rgba(16, 24, 40, 0.06)",
profile:
"0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03)",
creditCard: "8px 10px 16px 0px rgba(0, 0, 0, 0.05)",
},
fontFamily: {
inter: "var(--font-inter)",
"ibm-plex-serif": "var(--font-ibm-plex-serif)",
},
keyframes: {
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [
require("tailwindcss-animate"),
addVariablesForColors,
function ({ matchUtilities, theme }: any) {
matchUtilities(
{
"bg-dot-thick": (value: any) => ({
backgroundImage: `url("${svgToDataUri(
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16" fill="none"><circle fill="${value}" id="pattern-circle" cx="10" cy="10" r="2.5"></circle></svg>`
)}")`,
}),
},
{ values: flattenColorPalette(theme("backgroundColor")), type: "color" }
);
},
],
} satisfies Config;
export default config;