mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
chore: support primary as object of colors
This commit is contained in:
@@ -5,10 +5,12 @@ import presetIcons from '@unocss/preset-icons'
|
||||
|
||||
export default defineNuxtModule({
|
||||
async setup (_options, nuxt) {
|
||||
const _primary = _options?.primary || 'indigo'
|
||||
|
||||
const options = {
|
||||
theme: {
|
||||
colors: {
|
||||
primary: colors ? colors[_options?.primary || 'indigo'] : undefined
|
||||
primary: typeof _primary === 'object' ? _primary : (colors && colors[_primary])
|
||||
}
|
||||
},
|
||||
presets: [
|
||||
|
||||
Reference in New Issue
Block a user