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.

597 B
Raw Blame
import CaretDownIcon from '@icon/system/regular/caret-down.svg';
import { cn } from '@ui';
import { Show } from 'solid-js';
import { useProperty } from '../core/context';

type Props = {
  class?: string;
};

/**
 * Caret-down affordance — hidden when the property is read-only.
 * Must be inside <Property.Root>.
 */
export function PropertyCaret(props: Props) {
  const ctx = useProperty();
  const isReadOnly = () => !ctx.canEdit() || ctx.property().isMetadata;

  return (
    <Show when={!isReadOnly()}>
      <CaretDownIcon class={cn('size-3 shrink-0', props.class)} />
    </Show>
  );
}