Skip to content

Commit 4ec91de

Browse files
committed
feat: add html attributes to cards
1 parent d2f3414 commit 4ec91de

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Card.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import React, {
77
ImgHTMLAttributes
88
} from "react";
99
import { symToStr } from "tsafe/symToStr";
10-
import { assert } from "tsafe/assert";
11-
import type { Equals } from "tsafe";
1210

1311
import type { FrIconClassName, RiIconClassName } from "./fr/generatedFromCss/classNames";
1412
import { fr } from "./fr";
@@ -64,7 +62,8 @@ export type CardProps = {
6462
style?: CSSProperties;
6563
} & (CardProps.EnlargedLink | CardProps.NotEnlargedLink) &
6664
(CardProps.Horizontal | CardProps.Vertical) &
67-
(CardProps.WithImageLink | CardProps.WithImageComponent | CardProps.WithoutImage);
65+
(CardProps.WithImageLink | CardProps.WithImageComponent | CardProps.WithoutImage) &
66+
React.HTMLAttributes<HTMLDivElement>;
6867

6968
export namespace CardProps {
7069
export type EnlargedLink = {
@@ -149,8 +148,6 @@ export const Card = memo(
149148
...rest
150149
} = props;
151150

152-
assert<Equals<keyof typeof rest, never>>();
153-
154151
const id = useAnalyticsId({
155152
"defaultIdPrefix": "fr-card",
156153
"explicitlyProvidedId": props_id

0 commit comments

Comments
 (0)