refactor: 重构 Tailwind 配置以支持模块化和共享主题
- 更新 components.json,修改 CSS 文件路径为 src/styles/shell.css。 - 移除 tailwind.config.js 中的冗余配置,改为导入 tailwind.shell.config.js。 - 新增 tailwind.pages.config.js 和 tailwind.shared.js,集中管理主题和样式配置。 - 更新多个组件以使用新的样式类和配置,提升代码一致性和可维护性。
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { sharedTheme } from './tailwind.shared.js';
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
darkMode: 'class',
|
||||
content: [
|
||||
'./src/pages/**/*.{js,ts,jsx,tsx}',
|
||||
'./src/components/CopyButton.tsx',
|
||||
'./src/components/TextInputArea.tsx',
|
||||
'./src/components/SwitchButtonGroup.tsx',
|
||||
'./src/components/EmptyPlaceholder.tsx',
|
||||
'./src/components/ui/badge.tsx',
|
||||
'./src/components/ui/checkbox.tsx',
|
||||
'./src/components/ui/dialog.tsx',
|
||||
'./src/components/ui/label.tsx',
|
||||
'./src/components/ui/select.tsx',
|
||||
'./src/components/ui/switch.tsx',
|
||||
'./src/styles/pages.css',
|
||||
],
|
||||
theme: sharedTheme,
|
||||
plugins: [],
|
||||
};
|
||||
Reference in New Issue
Block a user