ConnectionIcon.tsx21 lines · main
1import { getMcpClientIconSrc } from '../utils/getMcpIconSrc'
2
3interface ConnectionIconProps {
4 theme?: 'light' | 'dark'
5 connection: string
6 /** Set when this client has a separate -icon-dark.svg; otherwise the same icon is used for both themes. */
7 hasDistinctDarkIcon?: boolean
8}
9
10export const ConnectionIcon = ({
11 theme = 'dark',
12 connection,
13 hasDistinctDarkIcon,
14}: ConnectionIconProps) => {
15 const src = getMcpClientIconSrc({
16 icon: connection,
17 useDarkVariant: theme === 'dark',
18 hasDistinctDarkIcon,
19 })
20 return <img src={src} alt={`${connection} logo`} width={14} height={14} />
21}