({ method, className = '', text }: HttpIconProps)
| 8 | } |
| 9 | |
| 10 | export function HttpMethodText({ method, className = '', text }: HttpIconProps) { |
| 11 | if (method) { |
| 12 | try { |
| 13 | const httpMethod = HTTP_METHOD_CONFIG[method] |
| 14 | |
| 15 | return ( |
| 16 | <span className={className} style={{ color: `var(${httpMethod.color})` }}> |
| 17 | {text ?? httpMethod.text} |
| 18 | </span> |
| 19 | ) |
| 20 | } |
| 21 | catch { |
| 22 | return null |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | return null |
| 27 | } |
nothing calls this directly
no outgoing calls
no test coverage detected