MCPcopy Create free account
hub / github.com/Codennnn/Apifox-UI / HttpMethodText

Function HttpMethodText

src/components/icons/HttpMethodText.tsx:10–27  ·  view source on GitHub ↗
({ method, className = '', text }: HttpIconProps)

Source from the content-addressed store, hash-verified

8}
9
10export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected