All files / src/pages/flowsheet-page/economics/page/components StepSectionHeader.tsx

100% Statements 11/11
55.55% Branches 5/9
100% Functions 1/1
100% Lines 7/7

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      5x                       8x 10x 15x 5x   10x 15x      
import type { EconomicsStepState } from "../model";
import { StepStateBadge } from "./StepStateBadge";
 
export function StepSectionHeader({
  title,
  state,
  detail,
}: {
  title: string;
  state: EconomicsStepState;
  detail?: string;
}) {
  return (
    <div className="min-w-0">
      <div className="flex flex-wrap items-center gap-2">
        <h2 className="text-sm font-semibold">{title}</h2>
        <StepStateBadge state={state} />
      </div>
      {detail ? (
        <p className="mt-1 text-xs text-muted-foreground">{detail}</p>
      ) : null}
    </div>
  );
}