Skip to content

Commit 7199274

Browse files
committed
feat: add action dropdown for service user
1 parent 260fd1a commit 7199274

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

ui/src/containers/webhooks/columns.tsx

+33-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ApsaraColumnDef } from "@raystack/apsara";
1+
import { DotsVerticalIcon, TrashIcon, UpdateIcon } from "@radix-ui/react-icons";
2+
import { ApsaraColumnDef, DropdownMenu, Flex } from "@raystack/apsara";
23
import { V1Beta1Webhook } from "@raystack/frontier";
34

45
export const getColumns: () => ApsaraColumnDef<V1Beta1Webhook>[] = () => {
@@ -33,7 +34,37 @@ export const getColumns: () => ApsaraColumnDef<V1Beta1Webhook>[] = () => {
3334
{
3435
header: "Action",
3536
accessorKey: "id",
36-
cell: () => null,
37+
cell: () => (
38+
<DropdownMenu style={{ padding: "0 !important" }}>
39+
<DropdownMenu.Trigger asChild style={{ cursor: "pointer" }}>
40+
<DotsVerticalIcon />
41+
</DropdownMenu.Trigger>
42+
<DropdownMenu.Content align="end">
43+
<DropdownMenu.Group style={{ padding: 0 }}>
44+
<DropdownMenu.Item style={{ padding: 0 }}>
45+
<Flex
46+
style={{ padding: "12px" }}
47+
gap={"small"}
48+
data-test-id="admin-ui-webhook-update-btn"
49+
>
50+
<UpdateIcon />
51+
Update
52+
</Flex>
53+
</DropdownMenu.Item>
54+
<DropdownMenu.Item style={{ padding: 0 }}>
55+
<Flex
56+
style={{ padding: "12px" }}
57+
gap={"small"}
58+
data-test-id="admin-ui-webhook-delete-btn"
59+
>
60+
<TrashIcon />
61+
Delete
62+
</Flex>
63+
</DropdownMenu.Item>
64+
</DropdownMenu.Group>
65+
</DropdownMenu.Content>
66+
</DropdownMenu>
67+
),
3768
},
3869
];
3970
};

0 commit comments

Comments
 (0)