Skip to documentation

Design system / Sources & standards

Current repository source

reviewer-member-actions.tsx

src/app/(tenants)/console/[tenantCode]/admin/programs/[programCode]/editions/[editionCode]/review-rounds/components/reviewer-member-actions.tsx

This view contains the escaped source read during the deployment build. Code and policy text are unchanged. Markdown is shown as source, not rendered as a document. A new deployment refreshes the content.

import { UserX } from "lucide-react";
import { Button } from "@/components/ui/button";
import type { ReviewerEntry } from "../types";

export type ReviewerMemberActionsProps = {
  reviewer: ReviewerEntry;
  reviewerLabel: string;
  disabled: boolean;
  canExclude: boolean;
  onToggleExclusion: () => void | Promise<void>;
};

/** Route-owned molecule for reviewer-only controls. The instance binds commands
 * to the source index; neither the shared card nor this view chooses identity. */
export function ReviewerMemberActions({ reviewer, reviewerLabel, disabled,
  canExclude, onToggleExclusion }: ReviewerMemberActionsProps) {
  const blocked = disabled || reviewer.pending;
  return <>
    {canExclude && <Button type="button" variant="ghost" size="icon" disabled={blocked} onClick={onToggleExclusion}
      aria-label={`${reviewer.isExcluded ? "Include" : "Exclude"} ${reviewer.email ?? "reviewer"}`}
      title={`${reviewer.isExcluded ? "Include" : "Exclude"} ${reviewerLabel.toLowerCase()}`}>
      <UserX className={reviewer.isExcluded ? "size-4 text-destructive" : "size-4"} aria-hidden="true" />
    </Button>}
  </>;
}
All sources and standards
Current components and theme tokens. Fictional example data. Source views refresh on deployment; authors maintain contract notes.