Skip to content

Commit

Permalink
Merge pull request #245 from ashrafchowdury/enhace/242-improve-model-ui
Browse files Browse the repository at this point in the history
enhance: improved domain and team dialog model UI
  • Loading branch information
mfts committed Feb 1, 2024
2 parents 9ca256e + cda9cb3 commit 6793aa1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 30 deletions.
28 changes: 13 additions & 15 deletions components/domains/add-domain-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,28 +94,26 @@ export function AddDomainModal({
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent className="sm:max-w-[425px]">
<DialogHeader>
<DialogHeader className="text-start">
<DialogTitle>Add Domain</DialogTitle>
<DialogDescription>
You can easily add a custom domain.
</DialogDescription>
</DialogHeader>
<form onSubmit={handleSubmit}>
<div className="grid gap-4 py-4">
<div className="grid grid-cols-4 items-center gap-4">
<Label htmlFor="domain" className="text-right">
Domain
</Label>
<Input
id="domain"
placeholder="docs.yourdomain.com"
className="col-span-3"
onChange={(e) => setDomain(e.target.value)}
/>
</div>
</div>
<Label htmlFor="domain" className="opacity-80">
Domain
</Label>
<Input
id="domain"
placeholder="docs.yourdomain.com"
className="w-full mt-1 mb-8"
onChange={(e) => setDomain(e.target.value)}
/>
<DialogFooter>
<Button type="submit">Add domain</Button>
<Button type="submit" className="w-full h-9">
Add domain
</Button>
</DialogFooter>
</form>
</DialogContent>
Expand Down
27 changes: 12 additions & 15 deletions components/teams/add-team-member-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,25 @@ export function AddTeamMembers({
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent className="sm:max-w-[425px]">
<DialogHeader>
<DialogHeader className="text-start">
<DialogTitle>Add Member</DialogTitle>
<DialogDescription>
You can easily add team members.
</DialogDescription>
</DialogHeader>
<form onSubmit={handleSubmit}>
<div className="grid gap-4 py-4">
<div className="grid grid-cols-4 items-center gap-4">
<Label htmlFor="domain" className="text-right">
Email
</Label>
<Input
id="email"
placeholder="team@member.com"
className="col-span-3"
onChange={(e) => setEmail(e.target.value)}
/>
</div>
</div>
<Label htmlFor="domain" className="opacity-80">
Email
</Label>
<Input
id="email"
placeholder="team@member.com"
className="w-full mt-1 mb-8"
onChange={(e) => setEmail(e.target.value)}
/>

<DialogFooter>
<Button type="submit">
<Button type="submit" className="w-full h-9">
{loading ? "Sending email..." : "Add member"}
</Button>
</DialogFooter>
Expand Down

0 comments on commit 6793aa1

Please sign in to comment.