MCPcopy Create free account
hub / github.com/EsperoTech/yaade / getMethodColor

Function getMethodColor

client/src/utils/index.tsx:21–44  ·  view source on GitHub ↗
(method: string)

Source from the content-addressed store, hash-verified

19}
20
21function getMethodColor(method: string): any {
22 switch (method) {
23 case 'GET':
24 return {
25 color: 'var(--chakra-colors-green-500)',
26 };
27 case 'POST':
28 return {
29 color: 'var(--chakra-colors-orange-500)',
30 };
31 case 'PUT':
32 return {
33 color: 'var(--chakra-colors-blue-500)',
34 };
35 case 'DELETE':
36 return {
37 color: 'var(--chakra-colors-red-500)',
38 };
39 default:
40 return {
41 color: 'var(--chakra-colors-gray-500)',
42 };
43 }
44}
45
46function successToast(msg: string, toast: any) {
47 toast({

Callers 1

CollectionRequestFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected