diff options
Diffstat (limited to 'FrontEnd/src/views/common/Card.tsx')
-rw-r--r-- | FrontEnd/src/views/common/Card.tsx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/FrontEnd/src/views/common/Card.tsx b/FrontEnd/src/views/common/Card.tsx index ebbce77e..50632006 100644 --- a/FrontEnd/src/views/common/Card.tsx +++ b/FrontEnd/src/views/common/Card.tsx @@ -1,19 +1,21 @@ +import { ComponentPropsWithoutRef, Ref } from "react"; import classNames from "classnames"; -import * as React from "react"; import "./Card.css"; -function _Card( - { - className, - children, - ...otherProps - }: React.PropsWithChildren<React.HTMLAttributes<HTMLDivElement>>, - ref: React.ForwardedRef<HTMLDivElement> -): React.ReactElement | null { +interface CardProps extends ComponentPropsWithoutRef<"div"> { + containerRef: Ref<HTMLDivElement>; +} + +export default function Card({ + className, + children, + containerRef, + ...otherProps +}: CardProps) { return ( <div - ref={ref} + ref={containerRef} className={classNames("cru-card", className)} {...otherProps} > @@ -21,7 +23,3 @@ function _Card( </div> ); } - -const Card = React.forwardRef(_Card); - -export default Card; |