Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download components/method/index.tsx from enzostvs/hub-api-playground: direct link, hf CLI and curl.
- Browser
- Download file 506 Bytes
-
https://huggingface.co/spaces/enzostvs/hub-api-playground/resolve/ecaee451983f85e8a45f037cfc40eba1e234a5c7/components/method/index.tsx
- Command line
-
hf download hf://spaces/enzostvs/hub-api-playground@ecaee451983f85e8a45f037cfc40eba1e234a5c7/components/method/index.tsx
-
curl -L -o index.tsx https://huggingface.co/spaces/enzostvs/hub-api-playground/resolve/ecaee451983f85e8a45f037cfc40eba1e234a5c7/components/method/index.tsx
506 Bytes
| 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> | |
| ); | |