Skip to content

Commit 250815b

Browse files
committed
chore: update opennextjs ui dependencies
1 parent 4af7948 commit 250815b

5 files changed

Lines changed: 17 additions & 39 deletions

File tree

examples/opennextjs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"devDependencies": {
4343
"@cloudflare/workers-types": "^4.20260405.1",
4444
"@opennextjs/cloudflare": "^1.6.5",
45+
"@radix-ui/react-primitive": "^2.1.3",
4546
"@types/node": "^20",
4647
"@types/react": "^19",
4748
"@types/react-dom": "^19",

examples/opennextjs/src/app/dashboard/SignOutButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default function SignOutButton() {
4040
router.replace("/"); // Redirect to home page on sign out
4141
});
4242
},
43-
onError: err => {
43+
onError: (err: { error: { message: string } }) => {
4444
console.error("Sign out error:", err);
4545
setError(err.error.message || "Sign out failed. Please try again.");
4646
// Optionally, still attempt to redirect or handle UI differently

examples/opennextjs/src/components/ui/dialog.tsx

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,23 @@ import * as DialogPrimitive from "@radix-ui/react-dialog";
55
import { XIcon } from "lucide-react";
66
import * as React from "react";
77

8-
type WithClassAndChildren = { className?: string; children?: React.ReactNode };
9-
10-
function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root> & WithClassAndChildren) {
8+
function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {
119
return <DialogPrimitive.Root data-slot="dialog" {...props} />;
1210
}
1311

14-
function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger> & WithClassAndChildren) {
12+
function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
1513
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
1614
}
1715

18-
function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal> & WithClassAndChildren) {
16+
function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
1917
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
2018
}
2119

22-
function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close> & WithClassAndChildren) {
20+
function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {
2321
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
2422
}
2523

26-
function DialogOverlay({
27-
className,
28-
...props
29-
}: React.ComponentProps<typeof DialogPrimitive.Overlay> & WithClassAndChildren) {
24+
function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
3025
return (
3126
<DialogPrimitive.Overlay
3227
data-slot="dialog-overlay"
@@ -44,10 +39,9 @@ function DialogContent({
4439
children,
4540
showCloseButton = true,
4641
...props
47-
}: React.ComponentProps<typeof DialogPrimitive.Content> &
48-
WithClassAndChildren & {
49-
showCloseButton?: boolean;
50-
}) {
42+
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
43+
showCloseButton?: boolean;
44+
}) {
5145
return (
5246
<DialogPortal data-slot="dialog-portal">
5347
<DialogOverlay />
@@ -94,10 +88,7 @@ function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
9488
);
9589
}
9690

97-
function DialogTitle({
98-
className,
99-
...props
100-
}: React.ComponentProps<typeof DialogPrimitive.Title> & WithClassAndChildren) {
91+
function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {
10192
return (
10293
<DialogPrimitive.Title
10394
data-slot="dialog-title"
@@ -107,10 +98,7 @@ function DialogTitle({
10798
);
10899
}
109100

110-
function DialogDescription({
111-
className,
112-
...props
113-
}: React.ComponentProps<typeof DialogPrimitive.Description> & WithClassAndChildren) {
101+
function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {
114102
return (
115103
<DialogPrimitive.Description
116104
data-slot="dialog-description"

examples/opennextjs/src/components/ui/label.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import { cn } from "@/lib/utils";
44
import * as LabelPrimitive from "@radix-ui/react-label";
55
import * as React from "react";
66

7-
function Label({
8-
className,
9-
...props
10-
}: React.ComponentProps<typeof LabelPrimitive.Root> & { className?: string; children?: React.ReactNode }) {
7+
function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
118
return (
129
<LabelPrimitive.Root
1310
data-slot="label"

examples/opennextjs/src/components/ui/tabs.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import { cn } from "@/lib/utils";
44
import * as TabsPrimitive from "@radix-ui/react-tabs";
55
import * as React from "react";
66

7-
type WithClassAndChildren = { className?: string; children?: React.ReactNode };
8-
9-
function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root> & WithClassAndChildren) {
7+
function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {
108
return <TabsPrimitive.Root data-slot="tabs" className={cn("flex flex-col gap-2", className)} {...props} />;
119
}
1210

13-
function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List> & WithClassAndChildren) {
11+
function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {
1412
return (
1513
<TabsPrimitive.List
1614
data-slot="tabs-list"
@@ -23,10 +21,7 @@ function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimi
2321
);
2422
}
2523

26-
function TabsTrigger({
27-
className,
28-
...props
29-
}: React.ComponentProps<typeof TabsPrimitive.Trigger> & WithClassAndChildren) {
24+
function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
3025
return (
3126
<TabsPrimitive.Trigger
3227
data-slot="tabs-trigger"
@@ -39,10 +34,7 @@ function TabsTrigger({
3934
);
4035
}
4136

42-
function TabsContent({
43-
className,
44-
...props
45-
}: React.ComponentProps<typeof TabsPrimitive.Content> & WithClassAndChildren) {
37+
function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {
4638
return (
4739
<TabsPrimitive.Content data-slot="tabs-content" className={cn("flex-1 outline-none", className)} {...props} />
4840
);

0 commit comments

Comments
 (0)