@@ -23,9 +23,10 @@ interface SidebarProps {
23
23
activeTab ?: string ;
24
24
onTabChange ?: ( tab : string ) => void ;
25
25
readmeContent ?: string | null ;
26
+ pickerDisabled ?: boolean ;
26
27
}
27
28
28
- export function Sidebar ( { activeTab = "preview" , onTabChange, readmeContent } : SidebarProps ) {
29
+ export function Sidebar ( { activeTab = "preview" , onTabChange, readmeContent, pickerDisabled } : SidebarProps ) {
29
30
const router = useRouter ( ) ;
30
31
const pathname = usePathname ( ) ;
31
32
const [ isDarkTheme , setIsDarkTheme ] = useState < boolean > ( false ) ;
@@ -105,30 +106,32 @@ export function Sidebar({ activeTab = "preview", onTabChange, readmeContent }: S
105
106
{ /* Controls Section */ }
106
107
< div className = "p-4 border-b bg-background" >
107
108
{ /* Preview/Code Tabs */ }
108
- < div className = "mb-1" >
109
- < label className = "block text-sm font-medium text-muted-foreground mb-2" > View</ label >
110
- < DropdownMenu >
111
- < DropdownMenuTrigger asChild >
112
- < Button variant = "outline" className = "w-full justify-between" >
113
- { currentIntegration ? currentIntegration . name : "Select Integration" }
114
- < ChevronDown className = "h-4 w-4 opacity-50" />
115
- </ Button >
116
- </ DropdownMenuTrigger >
117
- < DropdownMenuContent className = "w-56" >
118
- { menuIntegrations . map ( ( integration ) => (
119
- < DropdownMenuItem
120
- key = { integration . id }
121
- onClick = { ( ) => {
122
- router . push ( `/${ integration . id } ` ) ;
123
- } }
124
- className = "cursor-pointer"
125
- >
126
- < span > { integration . name } </ span >
127
- </ DropdownMenuItem >
128
- ) ) }
129
- </ DropdownMenuContent >
130
- </ DropdownMenu >
131
- </ div >
109
+ { ! pickerDisabled && (
110
+ < div className = "mb-1" >
111
+ < label className = "block text-sm font-medium text-muted-foreground mb-2" > View</ label >
112
+ < DropdownMenu >
113
+ < DropdownMenuTrigger asChild >
114
+ < Button variant = "outline" className = "w-full justify-between" >
115
+ { currentIntegration ? currentIntegration . name : "Select Integration" }
116
+ < ChevronDown className = "h-4 w-4 opacity-50" />
117
+ </ Button >
118
+ </ DropdownMenuTrigger >
119
+ < DropdownMenuContent className = "w-56" >
120
+ { menuIntegrations . map ( ( integration ) => (
121
+ < DropdownMenuItem
122
+ key = { integration . id }
123
+ onClick = { ( ) => {
124
+ router . push ( `/${ integration . id } ` ) ;
125
+ } }
126
+ className = "cursor-pointer"
127
+ >
128
+ < span > { integration . name } </ span >
129
+ </ DropdownMenuItem >
130
+ ) ) }
131
+ </ DropdownMenuContent >
132
+ </ DropdownMenu >
133
+ </ div >
134
+ ) }
132
135
</ div >
133
136
134
137
{ /* Demo List */ }
0 commit comments