@@ -4,11 +4,10 @@ import React, {
44 type ReactNode ,
55 type CSSProperties ,
66 DetailedHTMLProps ,
7- ImgHTMLAttributes
7+ ImgHTMLAttributes ,
8+ ReactHTMLElement
89} from "react" ;
910import { symToStr } from "tsafe/symToStr" ;
10- import { assert } from "tsafe/assert" ;
11- import type { Equals } from "tsafe" ;
1211
1312import type { FrIconClassName , RiIconClassName } from "./fr/generatedFromCss/classNames" ;
1413import { fr } from "./fr" ;
@@ -62,9 +61,11 @@ export type CardProps = {
6261 >
6362 > ;
6463 style ?: CSSProperties ;
64+ nativeDivElement ?: React . HTMLAttributes < HTMLDivElement > ;
6565} & ( CardProps . EnlargedLink | CardProps . NotEnlargedLink ) &
6666 ( CardProps . Horizontal | CardProps . Vertical ) &
67- ( CardProps . WithImageLink | CardProps . WithImageComponent | CardProps . WithoutImage ) ;
67+ ( CardProps . WithImageLink | CardProps . WithImageComponent | CardProps . WithoutImage ) &
68+ React . HTMLAttributes < HTMLDivElement > ;
6869
6970export namespace CardProps {
7071 export type EnlargedLink = {
@@ -146,11 +147,10 @@ export const Card = memo(
146147 grey = false ,
147148 iconId,
148149 style,
150+ nativeDivElement = { } ,
149151 ...rest
150152 } = props ;
151153
152- assert < Equals < keyof typeof rest , never > > ( ) ;
153-
154154 const id = useAnalyticsId ( {
155155 "defaultIdPrefix" : "fr-card" ,
156156 "explicitlyProvidedId" : props_id
@@ -161,6 +161,7 @@ export const Card = memo(
161161 return (
162162 < div
163163 id = { id }
164+ { ...nativeDivElement }
164165 className = { cx (
165166 fr . cx (
166167 "fr-card" ,
0 commit comments