File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ import { ConfigPanel } from "@/components/ui/ui-builder/internal/config-panel";
33
33
*/
34
34
export interface TabsContentConfig {
35
35
layers : { title : string ; content : React . ReactNode } ;
36
- appearance : { title : string ; content : React . ReactNode } ;
36
+ appearance ? : { title : string ; content : React . ReactNode } ;
37
37
}
38
38
39
39
/**
@@ -238,7 +238,7 @@ export function PageConfigPanel({
238
238
tabsContent,
239
239
} : {
240
240
className : string ;
241
- tabsContent : { layers : { title : string ; content : React . ReactNode } ; appearance : { title : string ; content : React . ReactNode } } ;
241
+ tabsContent : { layers : { title : string ; content : React . ReactNode } ; appearance ? : { title : string ; content : React . ReactNode } } ;
242
242
} ) {
243
243
const { layers, appearance } = tabsContent ;
244
244
return (
@@ -247,16 +247,18 @@ export function PageConfigPanel({
247
247
defaultValue = "layers"
248
248
className = { className }
249
249
>
250
- < TabsList className = " grid grid-cols-2 mx-4" >
250
+ < TabsList className = { ` grid ${ appearance ? ' grid-cols-2' : 'grid-cols-1' } mx-4` } >
251
251
< TabsTrigger value = "layers" > { layers . title } </ TabsTrigger >
252
- < TabsTrigger value = "appearance" > { appearance . title } </ TabsTrigger >
252
+ { appearance && < TabsTrigger value = "appearance" > { appearance . title } </ TabsTrigger > }
253
253
</ TabsList >
254
254
< TabsContent value = "layers" >
255
255
{ layers . content }
256
256
</ TabsContent >
257
- < TabsContent value = "appearance" >
258
- { appearance . content }
259
- </ TabsContent >
257
+ { appearance && (
258
+ < TabsContent value = "appearance" >
259
+ { appearance . content }
260
+ </ TabsContent >
261
+ ) }
260
262
</ Tabs >
261
263
) ;
262
264
}
You can’t perform that action at this time.
0 commit comments