mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 19:00:35 +01:00
feat(module): devtools integration (#2196)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -5,6 +5,13 @@ import type { Nuxt, NuxtTemplate, NuxtTypeTemplate } from '@nuxt/schema'
|
||||
import type { ModuleOptions } from './module'
|
||||
import * as theme from './theme'
|
||||
|
||||
export function buildTemplates(options: ModuleOptions) {
|
||||
return Object.entries(theme).reduce((acc, [key, component]) => {
|
||||
acc[key] = typeof component === 'function' ? component(options as Required<ModuleOptions>) : component
|
||||
return acc
|
||||
}, {} as Record<string, any>)
|
||||
}
|
||||
|
||||
export function getTemplates(options: ModuleOptions, uiConfig: Record<string, any>) {
|
||||
const templates: NuxtTemplate[] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user