Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
| import classNames from "classnames"; | |
| export const Method = ({ | |
| method, | |
| className, | |
| }: { | |
| method: string; | |
| className?: string; | |
| }) => ( | |
| <div | |
| className={classNames( | |
| `px-1 text-[10px] rounded text-slate-100 font-semibold inline-block ${className}`, | |
| { | |
| "bg-blue-500": method === "GET", | |
| "bg-green-600": method === "POST", | |
| "bg-yellow-600": method === "PUT" || method === "PATCH", | |
| "bg-red-600": method === "DELETE", | |
| } | |
| )} | |
| > | |
| {method} | |
| </div> | |
| ); | |