@@ -3,19 +3,18 @@ import React, {
33 forwardRef ,
44 type ReactNode ,
55 type CSSProperties ,
6- DetailedHTMLProps ,
7- ImgHTMLAttributes
6+ type DetailedHTMLProps ,
7+ type ImgHTMLAttributes
88} from "react" ;
99import { symToStr } from "tsafe/symToStr" ;
10- import { assert } from "tsafe/assert" ;
11- import type { Equals } from "tsafe" ;
1210
1311import type { FrIconClassName , RiIconClassName } from "./fr/generatedFromCss/classNames" ;
1412import { fr } from "./fr" ;
1513import type { RegisteredLinkProps } from "./link" ;
1614import { getLink } from "./link" ;
1715import { cx } from "./tools/cx" ;
1816import { useAnalyticsId } from "./tools/useAnalyticsId" ;
17+ import { assert , type Equals } from "tsafe/assert" ;
1918
2019//https://main--ds-gouv.netlify.app/example/component/card/
2120export type CardProps = {
@@ -62,10 +61,10 @@ export type CardProps = {
6261 >
6362 > ;
6463 style ?: CSSProperties ;
64+ nativeDivProps ?: DetailedHTMLProps < React . HTMLAttributes < HTMLDivElement > , HTMLDivElement > ;
6565} & ( CardProps . EnlargedLink | CardProps . NotEnlargedLink ) &
6666 ( CardProps . Horizontal | CardProps . Vertical ) &
6767 ( CardProps . WithImageLink | CardProps . WithImageComponent | CardProps . WithoutImage ) ;
68-
6968export namespace CardProps {
7069 export type EnlargedLink = {
7170 enlargeLink : true ;
@@ -146,6 +145,7 @@ export const Card = memo(
146145 grey = false ,
147146 iconId,
148147 style,
148+ nativeDivProps,
149149 ...rest
150150 } = props ;
151151
@@ -161,6 +161,7 @@ export const Card = memo(
161161 return (
162162 < div
163163 id = { id }
164+ { ...nativeDivProps }
164165 className = { cx (
165166 fr . cx (
166167 "fr-card" ,
0 commit comments