Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

646 B
Raw Blame
import RobotIcon from '@icon/system/regular/robot.svg';
import type { Bot } from '@service-storage/generated/schemas/bot';
import { Avatar } from '@ui';
import { Show } from 'solid-js';

export function BotAvatar(props: {
  bot: Pick<Bot, 'name' | 'avatar_url'>;
  size?: 'sm' | 'md' | 'lg';
}) {
  return (
    <Avatar size={props.size ?? 'md'}>
      <Show
        when={props.bot.avatar_url}
        fallback={
          <Avatar.Fallback>
            <RobotIcon class="size-4" />
          </Avatar.Fallback>
        }
      >
        {(avatarUrl) => <Avatar.Image src={avatarUrl()} alt={props.bot.name} />}
      </Show>
    </Avatar>
  );
}