Skip to content

Commit 7bfe50c

Browse files
author
Julien Bouquillon
committed
fix(Card): more TS
1 parent 7282806 commit 7bfe50c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Card.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,24 @@ export type CardProps = {
5757
string
5858
>
5959
>;
60-
} & (CardProps.Default | CardProps.Horizontal);
60+
} & (CardProps.Default | CardProps.Horizontal) &
61+
(CardProps.EnlargedLink | CardProps.NotEnlargedLink);
6162

6263
export namespace CardProps {
6364
export type Default = {
6465
horizontal?: never;
6566
};
66-
6767
export type Horizontal = {
6868
horizontal: true;
6969
};
70+
export type EnlargedLink = {
71+
enlargeLink: true;
72+
iconId?: FrIconClassName | RiIconClassName;
73+
};
74+
export type NotEnlargedLink = {
75+
enlargeLink?: false;
76+
iconId?: never;
77+
};
7078
}
7179

7280
/** @see <https://react-dsfr-components.etalab.studio/?path=/docs/components-alert> */

0 commit comments

Comments
 (0)