docs: capitalize HTTP methods in api reference (#8821)
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import clsx from "clsx"
|
||||||
import { Badge, capitalize } from "docs-ui"
|
import { Badge, capitalize } from "docs-ui"
|
||||||
|
|
||||||
export type MethodLabelProps = {
|
export type MethodLabelProps = {
|
||||||
@@ -9,7 +10,7 @@ const MethodLabel = ({ method, className }: MethodLabelProps) => {
|
|||||||
return (
|
return (
|
||||||
<Badge
|
<Badge
|
||||||
variant={method === "get" ? "green" : method === "post" ? "blue" : "red"}
|
variant={method === "get" ? "green" : method === "post" ? "blue" : "red"}
|
||||||
className={className}
|
className={clsx(className, "uppercase")}
|
||||||
>
|
>
|
||||||
{method === "delete" ? "Del" : capitalize(method)}
|
{method === "delete" ? "Del" : capitalize(method)}
|
||||||
</Badge>
|
</Badge>
|
||||||
|
|||||||
Reference in New Issue
Block a user