Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

1.3 KB
Raw Blame
import { cn } from '@langgenius/dify-ui/cn'
import DingTalkIcon from './assets/dingtalk.svg'
import EmailIcon from './assets/email.svg'
import FeishuIcon from './assets/feishu.svg'
import SlackIcon from './assets/slack.svg'
import WeComIcon from './assets/wecom.svg'

export function ContactChannelIcon({
  className,
  provider,
}: {
  className?: string
  provider: string
}) {
  const normalizedProvider = provider.toLocaleLowerCase()

  const icon = {
    ding_talk: DingTalkIcon.src,
    dingtalk: DingTalkIcon.src,
    email: EmailIcon.src,
    feishu: FeishuIcon.src,
    lark: FeishuIcon.src,
    slack: SlackIcon.src,
    we_com: WeComIcon.src,
    wecom: WeComIcon.src,
  }[normalizedProvider]

  if (icon) {
    return (
      <img
        alt=""
        aria-hidden
        className={cn(
          'block shrink-0 object-contain',
          normalizedProvider === 'email' ? 'size-4' : 'size-5',
          className,
        )}
        src={icon}
      />
    )
  }

  if (normalizedProvider === 'ms_teams' || normalizedProvider === 'teams') {
    return (
      <span
        aria-hidden
        className={cn('i-custom-public-other-teams block size-5 shrink-0', className)}
      />
    )
  }

  return (
    <span
      aria-hidden
      className={cn('i-ri-chat-3-line block size-4 text-text-tertiary', className)}
    />
  )
}