Skip to content

Commit 6838e26

Browse files
committed
design updates
1 parent c23b1a8 commit 6838e26

File tree

9 files changed

+526
-26
lines changed

9 files changed

+526
-26
lines changed

app/components/dialogs/edit-video-dialog.tsx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Button } from "@/components/ui/button";
22
import {
3-
Dialog,
4-
DialogContent,
5-
DialogHeader,
6-
DialogTitle,
7-
} from "@/components/ui/dialog";
3+
Credenza,
4+
CredenzaContent,
5+
CredenzaHeader,
6+
CredenzaTitle,
7+
} from "@/components/ui/credenza";
88
import { Input } from "@/components/ui/input";
99
import { Label } from "@/components/ui/label";
1010
import { Switch } from "@/components/ui/switch";
@@ -80,7 +80,6 @@ export function EditVideoDialog() {
8080
toast.error("An error occurred while editing the video.", {
8181
description: "Please try again",
8282
});
83-
// TODO: this might not be the best way to do this
8483
router.navigate({ to: "/videos" });
8584
}
8685
}
@@ -115,20 +114,20 @@ export function EditVideoDialog() {
115114
}
116115

117116
return (
118-
<Dialog
117+
<Credenza
119118
onOpenChange={(o) => {
120119
if (!o) {
121120
closeEditVideoDialog();
122121
}
123122
}}
124123
open={isEditVideoDialogOpen}
125124
>
126-
<DialogContent>
127-
<DialogHeader>
128-
<DialogTitle>Edit {editVideoDialogData.videoTitle}</DialogTitle>
129-
</DialogHeader>
125+
<CredenzaContent>
126+
<CredenzaHeader>
127+
<CredenzaTitle>Edit {editVideoDialogData.videoTitle}</CredenzaTitle>
128+
</CredenzaHeader>
130129
<form
131-
className="flex flex-col gap-2"
130+
className="flex flex-col gap-4"
132131
onSubmit={(e) => {
133132
e.preventDefault();
134133
form.handleSubmit();
@@ -182,18 +181,19 @@ export function EditVideoDialog() {
182181
}}
183182
/>
184183
<div className="flex gap-2 mt-2">
185-
<Button className="grow basis-1/2" onClick={closeEditVideoDialog}>
186-
Cancel
187-
</Button>
188184
<Button
189-
className="grow basis-1/2 bg-red-600 text-white"
190-
type="submit"
185+
variant="outline"
186+
className="grow basis-1/2"
187+
onClick={closeEditVideoDialog}
191188
>
189+
Cancel
190+
</Button>
191+
<Button className="grow basis-1/2" type="submit">
192192
Save Changes
193193
</Button>
194194
</div>
195195
</form>
196-
</DialogContent>
197-
</Dialog>
196+
</CredenzaContent>
197+
</Credenza>
198198
);
199199
}

app/components/dialogs/upload-video-dialog.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,9 @@ function UploadVideoDialogChild() {
286286
return (
287287
<Button
288288
disabled={!state.isValid}
289-
className="w-full bg-red-500 hover:bg-red-600 text-primary mt-2"
289+
className="w-full mt-2"
290290
type="button"
291291
onMouseDown={() => {
292-
closeUploadVideoDialog();
293292
form.handleSubmit();
294293
}}
295294
>

0 commit comments

Comments
 (0)