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.

389 B
Raw Blame
import { cn } from '@ui';
import type { Component, JSX } from 'solid-js';

export function renderIcon(
  icon: Component<JSX.SvgSVGAttributes<SVGSVGElement>> | string,
  className?: string
): JSX.Element {
  if (typeof icon === 'string') {
    return <img src={icon} alt="" class={cn('size-4', className)} />;
  }

  const Icon = icon;
  return <Icon class={cn('size-4', className)} />;
}