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.

703 B
Raw Blame
import {
  type BadgeSize,
  type BadgeVariant,
  badgeClasses,
  badgeTriggerClasses,
  cn,
} from '@ui';

type PropertyPillClassOptions = {
  variant?: BadgeVariant;
  size?: BadgeSize;
  class?: string;
  readOnly?: boolean;
  empty?: boolean;
};

/** Shared surface for property pills, including non-property metadata. */
export function propertyPillClasses(props: PropertyPillClassOptions = {}) {
  const options = {
    variant: props.variant ?? 'ghost',
    size: props.size ?? 'xs',
    class: cn(
      'max-w-full text-left',
      props.empty && 'text-ink-extra-muted',
      props.class
    ),
  } as const;

  return props.readOnly ? badgeClasses(options) : badgeTriggerClasses(options);
}