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
@@ -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>