ConfidenceBadge function presentation exported

Last updated: 2026-03-04T23:21:38.418Z

Metrics

LOC: 19 Complexity: 2 Params: 3

Signature

ConfidenceBadge({ confidence, prefix = "", }: ConfidenceBadgeProps)

Architecture violations

View all

  • [warning] function-camel-case: 'ConfidenceBadge' does not match naming convention /^[a-z][a-zA-Z0-9]*$/

Source Code

export function ConfidenceBadge({
  confidence,
  prefix = "",
}: ConfidenceBadgeProps) {
  const conf = confidence ?? 0;
  const percent = Math.round(conf * 100);
  const color = getConfidenceColor(conf);
  return (
    <Fragment>
      <span class={`${prefix}confidence-bar`}>
        <span
          class={`${prefix}confidence-fill`}
          style={{ width: `${percent}%`, background: color }}
        />
      </span>
      <span style={{ fontSize: "10px", color }}>{percent}%</span>
    </Fragment>
  );
}

No outgoing dependencies.

Impact (Incoming)

graph LR ConfidenceBadge["ConfidenceBadge"] FieldsTabCallbacks["FieldsTabCallbacks"] FieldsTabCallbacks -->|uses| ConfidenceBadge style ConfidenceBadge fill:#dbeafe,stroke:#2563eb,stroke-width:2px click ConfidenceBadge "4a01ec108381886b.html" click FieldsTabCallbacks "4ae0d4ee918b4d68.html"
SourceType
FieldsTabCallbacks uses