← Files NGS Analysis WorkbenchARCHIVED FILE

src/design-system/DisclosureSummary.tsx

587 Bytes · Sep 30, 2026 · 23:20 UTC

↓ Download file

import type { HTMLAttributes } from "react";
import { Icon } from "./Icon";

export function DisclosureSummary({
  children,
  chevronPosition = "start",
  ...props
}: HTMLAttributes<HTMLElement> & { chevronPosition?: "start" | "end" }) {
  const chevron = (
    <Icon
      className="ngs-disclosure-chevron"
      name="chevron-right-sm"
      size={16}
    />
  );
  return (
    <summary {...props} data-chevron-position={chevronPosition}>
      {chevronPosition === "start" ? chevron : null}
      {children}
      {chevronPosition === "end" ? chevron : null}
    </summary>
  );
}

SHA-256: 145d23a33e6e205eba3443148a55f97b4a3db46e32dbe82dfe7f5c6f953e00c8