(props: {
readonly index: number;
readonly label: string;
readonly hint?: string;
readonly htmlFor?: string;
})
| 554 | const STEP_HEADER_VARIANT: StepHeaderVariant = "eyebrow"; |
| 555 | |
| 556 | function StepHeader(props: { |
| 557 | readonly index: number; |
| 558 | readonly label: string; |
| 559 | readonly hint?: string; |
| 560 | readonly htmlFor?: string; |
| 561 | }) { |
| 562 | const { index, label, hint, htmlFor } = props; |
| 563 | |
| 564 | const variants: Record<StepHeaderVariant, React.ReactElement> = { |
| 565 | numbered: ( |
| 566 | <Label htmlFor={htmlFor} className="text-xs text-muted-foreground"> |
| 567 | {numberBadge(index)} |
| 568 | {label} |
| 569 | {hint ? <span className="font-normal text-muted-foreground/70">{hint}</span> : null} |
| 570 | </Label> |
| 571 | ), |
| 572 | eyebrow: ( |
| 573 | <div className="flex flex-col gap-1"> |
| 574 | <Label |
| 575 | htmlFor={htmlFor} |
| 576 | className="text-[11px] font-semibold uppercase tracking-wider text-muted-foreground" |
| 577 | > |
| 578 | {label} |
| 579 | </Label> |
| 580 | {hint ? <span className="text-xs text-muted-foreground/70">{hint}</span> : null} |
| 581 | </div> |
| 582 | ), |
| 583 | sentence: ( |
| 584 | <Label htmlFor={htmlFor} className="text-sm font-medium text-foreground"> |
| 585 | {label} |
| 586 | {hint ? <span className="text-xs font-normal text-muted-foreground">{hint}</span> : null} |
| 587 | </Label> |
| 588 | ), |
| 589 | accent: ( |
| 590 | <Label htmlFor={htmlFor} className="gap-2.5 text-xs text-muted-foreground"> |
| 591 | <span className="h-3.5 w-0.5 shrink-0 rounded-full bg-primary/70" aria-hidden /> |
| 592 | <span className="text-sm font-medium text-foreground">{label}</span> |
| 593 | {hint ? <span className="font-normal text-muted-foreground/70">{hint}</span> : null} |
| 594 | </Label> |
| 595 | ), |
| 596 | }; |
| 597 | |
| 598 | return variants[STEP_HEADER_VARIANT]; |
| 599 | } |
| 600 | |
| 601 | /** Derive the connection's display label from the user's free-text name (or a |
| 602 | * default of "<owner> <integration>"). With an empty `label` this yields the |
nothing calls this directly
no test coverage detected