@@ -39,18 +39,18 @@ export const Showcase = component$<ShowcaseProps>(({ name, ...props }) => {
39
39
40
40
console . log ( 'componentPath' , componentPath ) ;
41
41
42
- const Component = useSignal < Component < any > > ( ) ;
43
- const ComponentRaw = useSignal < string > ( ) ;
42
+ const ComponentSig = useSignal < Component < any > > ( ) ;
43
+ const ComponentRawSig = useSignal < string > ( ) ;
44
44
45
45
useTask$ ( async ( ) => {
46
46
// We need to call `await components[componentPath]()` in development as it is `eager:false`
47
47
if ( isDev ) {
48
- Component . value = await components [ componentPath ] ( ) ;
49
- ComponentRaw . value = await componentsRaw [ componentPath ] ( ) ;
48
+ ComponentSig . value = await components [ componentPath ] ( ) ;
49
+ ComponentRawSig . value = await componentsRaw [ componentPath ] ( ) ;
50
50
// We need to directly access the `components[componentPath]` expression in preview/production as it is `eager:true`
51
51
} else {
52
- Component . value = components [ componentPath ] ;
53
- ComponentRaw . value = componentsRaw [ componentPath ] ;
52
+ ComponentSig . value = components [ componentPath ] ;
53
+ ComponentRawSig . value = componentsRaw [ componentPath ] ;
54
54
}
55
55
} ) ;
56
56
@@ -71,11 +71,14 @@ export const Showcase = component$<ShowcaseProps>(({ name, ...props }) => {
71
71
</ TabList >
72
72
< TabPanel class = "shadow-light-medium dark:shadow-dark-medium border-qwikui-blue-300 dark:border-qwikui-purple-200 rounded-b-xl border-[1.5px] bg-slate-200 bg-slate-800 p-4 dark:bg-slate-900 md:p-12" >
73
73
< section class = "flex flex-col items-center" >
74
- { Component . value && < Component . value /> }
74
+ { ComponentSig . value && < ComponentSig . value /> }
75
75
</ section >
76
76
</ TabPanel >
77
77
< TabPanel class = "border-qwikui-blue-300 dark:border-qwikui-purple-200 relative rounded-b-xl border-[1.5px]" >
78
- < Highlight class = "rounded-b-xl rounded-t-none" code = { ComponentRaw . value || '' } />
78
+ < Highlight
79
+ class = "rounded-b-xl rounded-t-none"
80
+ code = { ComponentRawSig . value || '' }
81
+ />
79
82
</ TabPanel >
80
83
</ Tabs >
81
84
) ;
0 commit comments