docs(ComponentCode): handle pro theme

This commit is contained in:
Benjamin Canac
2024-12-10 12:11:55 +01:00
parent 57f4d613e6
commit c5a8914483

View File

@@ -5,6 +5,7 @@ import { upperFirst, camelCase, kebabCase } from 'scule'
import { hash } from 'ohash'
import { CalendarDate } from '@internationalized/date'
import * as theme from '#build/ui'
import * as themePro from '#build/ui-pro'
import { get, set } from '#ui/utils'
interface Cast {
@@ -116,7 +117,7 @@ function setComponentProp(name: string, value: any) {
set(componentProps, name, value)
}
const componentTheme = (theme as any)[camelName]
const componentTheme = ((props.pro ? themePro : theme) as any)[camelName]
const meta = await fetchComponentMeta(name as any)
function mapKeys(obj: object, parentKey = ''): any {