MCPcopy Create free account
hub / github.com/github/docs / RestMethod

Function RestMethod

components/rest/RestMethod.tsx:10–22  ·  view source on GitHub ↗
({ verb, requestPath }: RestMethodT)

Source from the content-addressed store, hash-verified

8}
9
10export function RestMethod({ verb, requestPath }: RestMethodT) {
11 // If the path is long, we want to break it up into multiple lines,
12 // breaking before the / character.
13 const displayPath = requestPath.length > 25 ? requestPath.replaceAll('/', '<wbr/>/') : requestPath
14 return (
15 <div className={cx(styles.method, 'my-0 text-mono d-flex flex-row flex-items-start ')}>
16 <span className="IssueLabel IssueLabel--big color-bg-accent-emphasis color-fg-on-emphasis text-uppercase mr-2">
17 {verb}
18 </span>
19 <span dangerouslySetInnerHTML={{ __html: displayPath }} />
20 </div>
21 )
22}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected