headplane/app/routes/users/dialogs/remove.tsx

27 lines
704 B
TypeScript
Raw Normal View History

import { X } from 'lucide-react';
2024-12-31 10:30:14 +05:30
import Code from '~/components/Code';
import Dialog from '~/components/Dialog';
2024-05-15 21:52:19 -04:00
interface Props {
2024-12-31 10:30:14 +05:30
username: string;
2024-05-15 21:52:19 -04:00
}
export default function Remove({ username }: Props) {
2024-05-15 21:52:19 -04:00
return (
<Dialog>
<Dialog.IconButton label={`Delete ${username}`}>
<X className="p-0.5" />
</Dialog.IconButton>
<Dialog.Panel>
<Dialog.Title>Delete {username}?</Dialog.Title>
<Dialog.Text className="mb-8">
Are you sure you want to delete {username}? A deleted user cannot be
recovered.
</Dialog.Text>
<input type="hidden" name="_method" value="delete" />
<input type="hidden" name="username" value={username} />
</Dialog.Panel>
</Dialog>
2024-12-31 10:30:14 +05:30
);
2024-05-15 21:52:19 -04:00
}