Files
frontend-uniapp/tailwind.config.ts
T
2025-01-20 08:01:53 +08:00

41 lines
818 B
TypeScript

import type {Config} from 'tailwindcss'
import {isMp, isQuickapp} from '@uni-helper/uni-env'
import {basePreset, elementPlusPreset, miniprogramBasePreset} from 'tailwind-extensions'
const presets: Config['presets'] = [basePreset]
if (isMp || isQuickapp) {
presets.push(
miniprogramBasePreset,
)
}
else {
presets.push(elementPlusPreset())
}
const theme: Config['theme'] = {
extend: {
colors: {
primary: '#4545E5',
default: '#828282',
disabled: '#D9D9D9',
},
backgroundColor: {
regular: '#F5F6F7',
},
},
boxShadow: {
'cell-group': '0px 4px 12px 0px rgba(0, 0, 0, 0.10)',
},
}
if (isMp || isQuickapp)
theme.screens = {}
const config: Config = {
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
presets,
theme,
}
export default config