Skip to content

Commit

Permalink
chore: configure the colors from design tokens in tailwind (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadshaheer authored Oct 10, 2024
1 parent 29360f0 commit f198b63
Show file tree
Hide file tree
Showing 3 changed files with 5,920 additions and 4,897 deletions.
21 changes: 11 additions & 10 deletions packages/tailwind-config/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "@signozhq/tailwind-config",
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"tailwindcss": "^3.4.12",
"tailwindcss-animate": "^1.0.7"
},
"publishConfig": {
"access": "public"
}
"name": "@signozhq/tailwind-config",
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"@signozhq/design-tokens": "latest",
"tailwindcss": "^3.4.12",
"tailwindcss-animate": "^1.0.7"
},
"publishConfig": {
"access": "public"
}
}
181 changes: 92 additions & 89 deletions packages/tailwind-config/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,91 +1,94 @@
/** @type {import('tailwindcss').Config} */
import tailwindAnimate from 'tailwindcss-animate';
import { ColorTailwind } from '@signozhq/design-tokens';

export default {
darkMode: ["class"],
content: ["./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
colors: {
background: {
DEFAULT: "#ffffff",
dark: "#121317",
},
foreground: {
DEFAULT: "#23262e",
dark: "#e9e9e9",
},
card: {
DEFAULT: "#ffffff",
foreground: "#23262e",
dark: "#1e2028",
"foreground-dark": "#e9e9e9",
},
popover: {
DEFAULT: "#ffffff",
foreground: "#23262e",
dark: "#1e2028",
"foreground-dark": "#e9e9e9",
},
primary: {
DEFAULT: "#3b82f6",
foreground: "#ffffff",
dark: "#60a5fa",
"foreground-dark": "#121317",
},
secondary: {
DEFAULT: "#f3f4f6",
foreground: "#374151",
dark: "#2a2d37",
"foreground-dark": "#d1d5db",
},
muted: {
DEFAULT: "#f3f4f6",
foreground: "#6b7280",
dark: "#2a2d37",
"foreground-dark": "#9ca3af",
},
accent: {
DEFAULT: "#8b5cf6",
foreground: "#ffffff",
dark: "#a78bfa",
"foreground-dark": "#121317",
},
destructive: {
DEFAULT: "#ef4444",
foreground: "#ffffff",
dark: "#f87171",
"foreground-dark": "#121317",
},
border: {
DEFAULT: "#e5e7eb",
dark: "#374151",
},
input: {
DEFAULT: "#e5e7eb",
dark: "#374151",
},
ring: {
DEFAULT: "#3b82f6",
dark: "#60a5fa",
},
chart: {
1: "#3b82f6",
2: "#10b981",
3: "#f59e0b",
4: "#ef4444",
5: "#8b5cf6",
"1-dark": "#60a5fa",
"2-dark": "#34d399",
"3-dark": "#fbbf24",
"4-dark": "#f87171",
"5-dark": "#a78bfa",
},
},
},
},
plugins: [require("tailwindcss-animate")],
darkMode: ['class'],
content: ['./src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {
borderRadius: {
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)',
},
colors: {
background: {
DEFAULT: '#ffffff',
dark: '#121317',
},
foreground: {
DEFAULT: '#23262e',
dark: '#e9e9e9',
},
card: {
DEFAULT: '#ffffff',
foreground: '#23262e',
dark: '#1e2028',
'foreground-dark': '#e9e9e9',
},
popover: {
DEFAULT: '#ffffff',
foreground: '#23262e',
dark: '#1e2028',
'foreground-dark': '#e9e9e9',
},
primary: {
DEFAULT: '#3b82f6',
foreground: '#ffffff',
dark: '#60a5fa',
'foreground-dark': '#121317',
},
secondary: {
DEFAULT: '#f3f4f6',
foreground: '#374151',
dark: '#2a2d37',
'foreground-dark': '#d1d5db',
},
muted: {
DEFAULT: '#f3f4f6',
foreground: '#6b7280',
dark: '#2a2d37',
'foreground-dark': '#9ca3af',
},
accent: {
DEFAULT: '#8b5cf6',
foreground: '#ffffff',
dark: '#a78bfa',
'foreground-dark': '#121317',
},
destructive: {
DEFAULT: '#ef4444',
foreground: '#ffffff',
dark: '#f87171',
'foreground-dark': '#121317',
},
border: {
DEFAULT: '#e5e7eb',
dark: '#374151',
},
input: {
DEFAULT: '#e5e7eb',
dark: '#374151',
},
ring: {
DEFAULT: '#3b82f6',
dark: '#60a5fa',
},
chart: {
1: '#3b82f6',
2: '#10b981',
3: '#f59e0b',
4: '#ef4444',
5: '#8b5cf6',
'1-dark': '#60a5fa',
'2-dark': '#34d399',
'3-dark': '#fbbf24',
'4-dark': '#f87171',
'5-dark': '#a78bfa',
},
...ColorTailwind,
},
},
},
plugins: [tailwindAnimate],
};
Loading

0 comments on commit f198b63

Please sign in to comment.