Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

726 B
Raw Blame
import { type ComposioAppType } from '@lobechat/const';
import { cssVar, Icon } from '@lobehub/ui';
import { memo } from 'react';

export const SKILL_ICON_SIZE = 20;

/**
 * Composio server icon component
 */
const ComposioSkillIcon = memo<Pick<ComposioAppType, 'icon' | 'label'> & { size: number }>(
  ({ icon, label, size = SKILL_ICON_SIZE }) => {
    if (typeof icon === 'string') {
      return (
        <img
          alt={label}
          src={icon}
          style={{ maxHeight: size, maxWidth: size, objectFit: 'contain' }}
        />
      );
    }

    return <Icon fill={cssVar.colorText} icon={icon} size={size} />;
  },
);

ComposioSkillIcon.displayName = 'ComposioSkillIcon';

export default ComposioSkillIcon;