docs: capitalize HTTP methods in api reference (#8821)

This commit is contained in:
Shahed Nasser
2024-08-28 15:44:42 +03:00
committed by GitHub
parent bfded6c2c8
commit e1fd448cd1

View File

@@ -1,3 +1,4 @@
import clsx from "clsx"
import { Badge, capitalize } from "docs-ui"
export type MethodLabelProps = {
@@ -9,7 +10,7 @@ const MethodLabel = ({ method, className }: MethodLabelProps) => {
return (
<Badge
variant={method === "get" ? "green" : method === "post" ? "blue" : "red"}
className={className}
className={clsx(className, "uppercase")}
>
{method === "delete" ? "Del" : capitalize(method)}
</Badge>