@@ -3,19 +3,18 @@ import React, {
3
3
forwardRef ,
4
4
type ReactNode ,
5
5
type CSSProperties ,
6
- DetailedHTMLProps ,
7
- ImgHTMLAttributes
6
+ type DetailedHTMLProps ,
7
+ type ImgHTMLAttributes
8
8
} from "react" ;
9
9
import { symToStr } from "tsafe/symToStr" ;
10
- import { assert } from "tsafe/assert" ;
11
- import type { Equals } from "tsafe" ;
12
10
13
11
import type { FrIconClassName , RiIconClassName } from "./fr/generatedFromCss/classNames" ;
14
12
import { fr } from "./fr" ;
15
13
import type { RegisteredLinkProps } from "./link" ;
16
14
import { getLink } from "./link" ;
17
15
import { cx } from "./tools/cx" ;
18
16
import { useAnalyticsId } from "./tools/useAnalyticsId" ;
17
+ import { assert , type Equals } from "tsafe/assert" ;
19
18
20
19
//https://main--ds-gouv.netlify.app/example/component/card/
21
20
export type CardProps = {
@@ -62,10 +61,10 @@ export type CardProps = {
62
61
>
63
62
> ;
64
63
style ?: CSSProperties ;
64
+ nativeDivProps ?: DetailedHTMLProps < React . HTMLAttributes < HTMLDivElement > , HTMLDivElement > ;
65
65
} & ( CardProps . EnlargedLink | CardProps . NotEnlargedLink ) &
66
66
( CardProps . Horizontal | CardProps . Vertical ) &
67
67
( CardProps . WithImageLink | CardProps . WithImageComponent | CardProps . WithoutImage ) ;
68
-
69
68
export namespace CardProps {
70
69
export type EnlargedLink = {
71
70
enlargeLink : true ;
@@ -146,6 +145,7 @@ export const Card = memo(
146
145
grey = false ,
147
146
iconId,
148
147
style,
148
+ nativeDivProps,
149
149
...rest
150
150
} = props ;
151
151
@@ -161,6 +161,7 @@ export const Card = memo(
161
161
return (
162
162
< div
163
163
id = { id }
164
+ { ...nativeDivProps }
164
165
className = { cx (
165
166
fr . cx (
166
167
"fr-card" ,
0 commit comments