mirror of
				https://github.com/ItzCrazyKns/Perplexica.git
				synced 2025-10-31 03:18:16 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			58 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import type { Config } from 'tailwindcss';
 | |
| import type { DefaultColors } from 'tailwindcss/types/generated/colors';
 | |
| 
 | |
| const themeDark = (colors: DefaultColors) => ({
 | |
|   50: '#0d1117',
 | |
|   100: '#161b22',
 | |
|   200: '#21262d',
 | |
|   300: '#30363d',
 | |
| });
 | |
| 
 | |
| const themeLight = (colors: DefaultColors) => ({
 | |
|   50: '#ffffff',
 | |
|   100: '#f6f8fa',
 | |
|   200: '#e8edf1',
 | |
|   300: '#d0d7de',
 | |
| });
 | |
| 
 | |
| const config: Config = {
 | |
|   content: [
 | |
|     './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
 | |
|     './src/components/**/*.{js,ts,jsx,tsx,mdx}',
 | |
|     './src/app/**/*.{js,ts,jsx,tsx,mdx}',
 | |
|   ],
 | |
|   darkMode: 'class',
 | |
|   theme: {
 | |
|     extend: {
 | |
|       borderColor: ({ colors }) => {
 | |
|         return {
 | |
|           light: themeLight(colors),
 | |
|           dark: themeDark(colors),
 | |
|         };
 | |
|       },
 | |
|       colors: ({ colors }) => {
 | |
|         const colorsDark = themeDark(colors);
 | |
|         const colorsLight = themeLight(colors);
 | |
| 
 | |
|         return {
 | |
|           dark: {
 | |
|             primary: colorsDark[50],
 | |
|             secondary: colorsDark[100],
 | |
|             ...colorsDark,
 | |
|           },
 | |
|           light: {
 | |
|             primary: colorsLight[50],
 | |
|             secondary: colorsLight[100],
 | |
|             ...colorsLight,
 | |
|           },
 | |
|         };
 | |
|       },
 | |
|     },
 | |
|   },
 | |
|   plugins: [
 | |
|     require('@tailwindcss/typography'),
 | |
|     require('@headlessui/tailwindcss')({ prefix: 'headless' }),
 | |
|   ],
 | |
| };
 | |
| export default config;
 |