Skip to content

Commit 49be0fe

Browse files
committed
feat: add close button to user form
1 parent 13f88f8 commit 49be0fe

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

src/client/editor/Users.tsx

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
PlusIcon,
1212
TrashIcon,
1313
UploadIcon,
14+
XIcon,
1415
} from "lucide-react";
1516
import { type FC, useState } from "react";
1617
import type { InferInput } from "valibot";
@@ -85,16 +86,28 @@ const UserForm: FC<UserFormProps> = ({ user, onSave, onDelete }) => {
8586
<h2 className="font-semibold text-content-primary text-xl">
8687
User Data
8788
</h2>
88-
<Button
89-
size="icon"
90-
variant="outline"
91-
onClick={(e) => {
92-
e.preventDefault();
93-
onDelete();
94-
}}
95-
>
96-
<TrashIcon />
97-
</Button>
89+
<div className="flex gap-1">
90+
<Button
91+
size="icon"
92+
variant="subtle"
93+
onClick={(e) => {
94+
e.preventDefault();
95+
onDelete();
96+
}}
97+
>
98+
<TrashIcon />
99+
</Button>
100+
<Button
101+
size="icon"
102+
variant="outline"
103+
onClick={(e) => {
104+
e.preventDefault();
105+
setIsEditing(false);
106+
}}
107+
>
108+
<XIcon />
109+
</Button>
110+
</div>
98111
</div>
99112
<form
100113
className="flex w-full flex-col gap-4"

0 commit comments

Comments
 (0)