1010 */
1111
1212import { BaseEdge , type EdgeProps , Handle , Position } from '@xyflow/react' ;
13- import { type ComponentName , componentLogoMap } from 'assets/connectors/component-logo-map' ;
13+ import type { ComponentName } from 'assets/connectors/component-logo-map' ;
1414import { Badge } from 'components/redpanda-ui/components/badge' ;
1515import { BadgeGroup } from 'components/redpanda-ui/components/badge-group' ;
1616import { Banner , BannerClose , BannerContent } from 'components/redpanda-ui/components/banner' ;
@@ -20,7 +20,7 @@ import { Skeleton } from 'components/redpanda-ui/components/skeleton';
2020import { Text } from 'components/redpanda-ui/components/typography' ;
2121import { cn } from 'components/redpanda-ui/lib/utils' ;
2222import { BaseNode } from 'components/ui/base-node' ;
23- import { BookOpenIcon , ChevronDown , ChevronUp , PlusIcon } from 'lucide-react' ;
23+ import { BookOpenIcon , Box , ChevronDown , ChevronUp , PlusIcon } from 'lucide-react' ;
2424
2525import { ConnectorLogo } from '../onboarding/connector-logo' ;
2626
@@ -106,12 +106,16 @@ const TreeSectionNode = ({ data }: { data: TreeNodeData }) => (
106106
107107const TreeGroupNode = ( { data } : { data : TreeNodeData } ) => (
108108 < button
109- className = { cn ( 'nodrag nopan flex h-7 max-w-[220px] items-center text-sm' , data . collapsible && 'cursor-pointer' ) }
109+ className = { cn (
110+ 'nodrag nopan flex h-7 max-w-[220px] items-center gap-1.5 text-sm' ,
111+ data . collapsible && 'cursor-pointer'
112+ ) }
110113 disabled = { ! data . collapsible }
111114 onClick = { data . collapsible ? data . onToggle : undefined }
112115 type = "button"
113116 >
114117 < Handle className = { invisibleHandle } position = { Position . Left } type = "target" />
118+ < ConnectorLogo className = "size-4" fallback = { Box } name = { data . label as ComponentName } />
115119 < Text as = "span" className = "min-w-0 truncate" title = { data . label } variant = "bodyStrongMedium" >
116120 { data . label }
117121 </ Text >
@@ -173,8 +177,8 @@ const TreeLeafNode = ({ data }: { data: TreeNodeData }) => {
173177 >
174178 < Handle className = { invisibleHandle } position = { Position . Left } type = "target" />
175179 < div className = "flex items-center gap-1.5" >
176- { ! isPlaceholder && componentLogoMap [ data . label as ComponentName ] ? (
177- < ConnectorLogo className = "size-4 shrink-0" name = { data . label as ComponentName } />
180+ { ! isPlaceholder ? (
181+ < ConnectorLogo className = "size-4" fallback = { Box } name = { data . label as ComponentName } />
178182 ) : null }
179183 < Text
180184 as = "span"
0 commit comments