cherry-studio/packages/ui/tailwind.config.js
MyPrototypeWhat d3028f1dd1 feat: add @cherrystudio/ui component library
- Introduced a new UI component library for Cherry Studio, including various components such as buttons, inputs, and layout elements.
- Updated configuration files to include the new library and its dependencies.
- Enhanced the project structure to support modular imports and TypeScript definitions for better development experience.
2025-09-15 12:03:39 +08:00

29 lines
715 B
JavaScript

// Tailwind config for UI component library
// This config is used for development and provides a template for consumers
let heroui
try {
// Try to load heroui if available (dev environment)
heroui = require('@heroui/react').heroui
} catch (e) {
// Fallback for environments without heroui
heroui = () => ({})
}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
// 扫描当前包的所有组件文件
'./src/**/*.{js,ts,jsx,tsx}',
// 扫描 HeroUI 的组件样式(如果存在)
'./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'
],
theme: {
extend: {
// 基础组件库主题扩展
}
},
darkMode: 'class',
plugins: [heroui()]
}