Skip to content

Commit 246427f

Browse files
Amarnath KaushikAmarnath Kaushik
authored andcommitted
Fix Card props typing for Next build
Allow standard section props (e.g. style) on Card to prevent typecheck failures during production builds.
1 parent 14eb082 commit 246427f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

frontend/src/components/ui/Card.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
import { ReactNode } from "react";
1+
import { ComponentPropsWithoutRef, ReactNode } from "react";
22

33
export function Card({
44
children,
55
className = "",
6+
...props
67
}: {
78
readonly children: ReactNode;
89
readonly className?: string;
9-
}) {
10+
} & Omit<ComponentPropsWithoutRef<"section">, "children" | "className">) {
1011
return (
11-
<section className={["ui-card", className].filter(Boolean).join(" ")}>
12+
<section
13+
className={["ui-card", className].filter(Boolean).join(" ")}
14+
{...props}
15+
>
1216
{children}
1317
</section>
1418
);

0 commit comments

Comments
 (0)