All files / src/pages/flowsheet-page/economics/results-panel/sections DetailAccordionSection.tsx

100% Statements 10/10
75% Branches 3/4
100% Functions 1/1
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34                  30x                     12x         30x     42x 60x 120x      
import { Table2 } from "lucide-react";
import type { ReactNode } from "react";
import {
  AccordionContent,
  AccordionItem,
  AccordionTrigger,
} from "@/ahuora-design-system/ui/accordion";
import type { DetailSectionValue } from "../model/types";
 
export function DetailAccordionSection({
  value,
  title,
  children,
}: {
  value: DetailSectionValue;
  title: string;
  children: ReactNode;
}) {
  return (
    <AccordionItem value={value} className="rounded-md border bg-background">
      <AccordionTrigger
        variant="objectPanel"
        className="rounded-md text-sm font-semibold text-foreground"
      >
        <span className="flex min-w-0 items-center gap-2">
          <Table2 className="size-4 shrink-0 text-primary" aria-hidden="true" />
          <span className="truncate">{title}</span>
        </span>
      </AccordionTrigger>
      <AccordionContent className="px-3 pb-3 pt-0">{children}</AccordionContent>
    </AccordionItem>
  );
}