fix: simple add-user form — 3 fields + small button
This commit is contained in:
parent
9009ffdfb0
commit
696f275567
|
|
@ -206,21 +206,19 @@ export default function UserManagementPanel() {
|
|||
</button>
|
||||
</div>
|
||||
|
||||
{/* Add form — compact column */}
|
||||
{/* Add form */}
|
||||
{showAddForm && (
|
||||
<form onSubmit={handleAddUser} className="mb-4 inline-flex flex-col gap-2 rounded-2xl border border-[var(--color-border)] bg-[var(--color-surface-strong)] p-4">
|
||||
<form onSubmit={handleAddUser} className="mb-4 rounded-2xl border border-[var(--color-border)] bg-[var(--color-surface-strong)] p-4 space-y-3">
|
||||
<Input
|
||||
placeholder="Имя"
|
||||
value={addForm.name}
|
||||
onChange={(e) => setAddForm((f) => ({ ...f, name: e.target.value }))}
|
||||
className="w-[220px]!"
|
||||
/>
|
||||
<Input
|
||||
placeholder="Email"
|
||||
type="email"
|
||||
value={addForm.email}
|
||||
onChange={(e) => setAddForm((f) => ({ ...f, email: e.target.value }))}
|
||||
className="w-[260px]!"
|
||||
/>
|
||||
<RoleDropdown
|
||||
value={addForm.role || 'manager'}
|
||||
|
|
@ -230,7 +228,7 @@ export default function UserManagementPanel() {
|
|||
<button
|
||||
type="submit"
|
||||
disabled={addSubmitting}
|
||||
className="mt-1 self-start rounded-full bg-[var(--color-accent)] px-5 py-2 text-sm font-semibold text-white hover:opacity-90 transition disabled:opacity-50"
|
||||
className="rounded-full bg-[var(--color-accent)] px-5 py-2 text-sm font-semibold text-white hover:opacity-90 transition disabled:opacity-50"
|
||||
>
|
||||
{addSubmitting ? 'Добавление…' : 'Добавить'}
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue