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
- [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)
| Source | Type |
|---|---|
| FieldsTabCallbacks | uses |