Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(web): align invite member modal styling

Azula971381932e315698
diff --git a/apps/web/src/components/team/invite-team-member-modal.tsx b/apps/web/src/components/team/invite-team-member-modal.tsx
index de2c13fa4..70f3cad46 100644
--- a/apps/web/src/components/team/invite-team-member-modal.tsx
+++ b/apps/web/src/components/team/invite-team-member-modal.tsx
@@ -1,6 +1,5 @@
import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
import { useQueryClient } from "@tanstack/react-query";
-import { X } from "lucide-react";
import { useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
import { z } from "zod/v4";
@@ -8,7 +7,15 @@ import useInviteWorkspaceUser from "@/hooks/mutations/workspace-user/use-invite-
import { toast } from "@/lib/toast";
import { Route } from "@/routes/_layout/_authenticated/dashboard/workspace/$workspaceId/members";
import { Button } from "../ui/button";
-import { Dialog, DialogClose, DialogPopup, DialogTitle } from "../ui/dialog";
+import {
+ Dialog,
+ DialogClose,
+ DialogFooter,
+ DialogHeader,
+ DialogPanel,
+ DialogPopup,
+ DialogTitle,
+} from "../ui/dialog";
import {
Form,
FormControl,
@@ -76,64 +83,44 @@ function InviteTeamMemberModal({ open, onClose }: Props) {
return (
<Dialog open={open} onOpenChange={resetAndCloseModal}>
<DialogPopup className="w-full max-w-md">
- <div className="bg-card rounded-lg shadow-xl">
- <div className="flex items-center justify-between p-4 border-b border-border">
- <DialogTitle className="text-lg font-semibold text-foreground">
- {t("team:inviteModal.title")}
- </DialogTitle>
- <DialogClose
- className="text-muted-foreground hover:text-foreground"
- render={<button type="button" />}
- >
- <X size={20} />
- </DialogClose>
- </div>
+ <DialogHeader>
+ <DialogTitle>{t("team:inviteModal.title")}</DialogTitle>
+ </DialogHeader>
- <Form {...form}>
- <form onSubmit={form.handleSubmit(onSubmit)} className="p-4">
- <div className="space-y-4">
- <div>
- <FormField
- control={form.control}
- name="email"
- render={({ field }) => (
- <FormItem>
- <FormLabel className="block text-sm font-medium text-foreground mb-1">
- {t("team:inviteModal.emailLabel")}
- </FormLabel>
- <FormControl>
- <Input
- {...field}
- placeholder={t("team:inviteModal.emailPlaceholder")}
- className="bg-card/50"
- autoFocus
- />
- </FormControl>
- <FormMessage />
- </FormItem>
- )}
- />
- </div>
- </div>
+ <Form {...form}>
+ <form onSubmit={form.handleSubmit(onSubmit)} className="contents">
+ <DialogPanel>
+ <FormField
+ control={form.control}
+ name="email"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>{t("team:inviteModal.emailLabel")}</FormLabel>
+ <FormControl>
+ <Input
+ {...field}
+ placeholder={t("team:inviteModal.emailPlaceholder")}
+ autoFocus
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ </DialogPanel>
- <div className="flex justify-end gap-2 mt-6">
- <DialogClose
- render={
- <Button
- className="bg-muted text-foreground hover:bg-accent"
- type="button"
- />
- }
- >
- {t("common:actions.cancel")}
- </DialogClose>
- <Button type="submit">
- {t("team:inviteModal.sendInvitation")}
- </Button>
- </div>
- </form>
- </Form>
- </div>
+ <DialogFooter>
+ <DialogClose
+ render={<Button variant="outline" size="sm" type="button" />}
+ >
+ {t("common:actions.cancel")}
+ </DialogClose>
+ <Button type="submit" size="sm">
+ {t("team:inviteModal.sendInvitation")}
+ </Button>
+ </DialogFooter>
+ </form>
+ </Form>
</DialogPopup>
</Dialog>
);