mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
chore: improve types export
This commit is contained in:
@@ -4,6 +4,8 @@ import tailwindcss from '@tailwindcss/vite'
|
||||
import { addTemplates } from './templates'
|
||||
import icons from './theme/icons'
|
||||
|
||||
export type * from './runtime/types'
|
||||
|
||||
export interface ModuleOptions {
|
||||
/**
|
||||
* Prefix for components
|
||||
@@ -40,8 +42,7 @@ export default defineNuxtModule<ModuleOptions>({
|
||||
|
||||
options.colors = options.colors?.length ? [...new Set(['primary', ...options.colors])] : ['primary', 'red', 'orange', 'amber', 'yellow', 'lime', 'green', 'emerald', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchia', 'pink', 'rose']
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
// @ts-expect-error - Add ui options to nuxt
|
||||
nuxt.options.ui = options
|
||||
|
||||
nuxt.options.alias['#ui'] = resolve('./runtime')
|
||||
@@ -54,6 +55,7 @@ export default defineNuxtModule<ModuleOptions>({
|
||||
|
||||
// Isolate root node from portaled components
|
||||
nuxt.options.app.rootAttrs = nuxt.options.app.rootAttrs || {}
|
||||
// TODO: Check if already set
|
||||
nuxt.options.app.rootAttrs.class = 'isolate'
|
||||
|
||||
addVitePlugin(tailwindcss)
|
||||
|
||||
Reference in New Issue
Block a user