({ label, value, onCopy, copied }: ErrorFieldProps)
| 127 | } |
| 128 | |
| 129 | function ErrorField({ label, value, onCopy, copied }: ErrorFieldProps) { |
| 130 | return ( |
| 131 | <div className="space-y-2"> |
| 132 | <div className="text-sm font-medium">{label}</div> |
| 133 | <div className="flex items-center gap-2"> |
| 134 | <div className="bg-muted p-2 rounded text-sm flex-1 break-words">{value}</div> |
| 135 | <Button |
| 136 | variant="outline" |
| 137 | size="icon" |
| 138 | className="h-8 w-8 shrink-0" |
| 139 | onClick={onCopy} |
| 140 | aria-label={`Copy ${label.toLowerCase()}`} |
| 141 | > |
| 142 | {copied ? ( |
| 143 | <CheckCircle2 className="h-4 w-4 text-green-500" /> |
| 144 | ) : ( |
| 145 | <Copy className="h-4 w-4" /> |
| 146 | )} |
| 147 | </Button> |
| 148 | </div> |
| 149 | </div> |
| 150 | ) |
| 151 | } |
nothing calls this directly
no outgoing calls
no test coverage detected