Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 929b30e

Browse files
committed
chore: improve design
1 parent d7b4e96 commit 929b30e

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

src/pages/apps/[id]/environments/[env-id]/function-triggers/FunctionTriggers.tsx

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ const { useFetchFunctionTriggers, deleteFunctionTrigger } = actions;
2323

2424
const colors: Record<
2525
FunctionTriggerMethod,
26-
"warning" | "info" | "error" | "primary"
26+
"warning" | "info" | "error" | "primary" | "success"
2727
> = {
2828
POST: "warning",
2929
PUT: "info",
3030
DELETE: "error",
31-
GET: "primary",
31+
GET: "success",
3232
PATCH: "primary",
3333
};
3434

@@ -124,14 +124,21 @@ export default function FunctionTriggers() {
124124
},
125125
]}
126126
>
127-
<Typography>
128-
<Span>
129-
<CircleIcon
130-
color={f.status ? "success" : "error"}
131-
sx={{ fontSize: 10, mr: 1 }}
132-
/>
133-
{f.status ? "Enabled" : "Disabled"}
134-
</Span>
127+
<Typography sx={{ display: "flex" }}>
128+
<Chip
129+
size="small"
130+
component="span"
131+
color={colors[f.options.method] || "primary"}
132+
label={f.options.method}
133+
sx={{ fontSize: 10, mr: 2, minWidth: "60px" }}
134+
/>
135+
<Typography
136+
component="span"
137+
color="text.secondary"
138+
sx={{ mr: 2, flex: 1 }}
139+
>
140+
{f.options.url}
141+
</Typography>
135142
<Span>
136143
<Tooltip
137144
title={
@@ -149,16 +156,13 @@ export default function FunctionTriggers() {
149156
</span>
150157
</Tooltip>
151158
</Span>
152-
<Chip
153-
size="small"
154-
component="span"
155-
color={colors[f.options.method] || "primary"}
156-
label={f.options.method}
157-
sx={{ fontSize: 10, mr: 2 }}
158-
/>
159-
<Typography component="span" color="text.secondary" sx={{ mr: 2 }}>
160-
{f.options.url}
161-
</Typography>
159+
<Span>
160+
<CircleIcon
161+
color={f.status ? "success" : "error"}
162+
sx={{ fontSize: 10, mr: 1 }}
163+
/>
164+
{f.status ? "Enabled" : "Disabled"}
165+
</Span>
162166
</Typography>
163167
</CardRow>
164168
))}

0 commit comments

Comments
 (0)