Skip to content

Commit 7010b0c

Browse files
hugues-mHugues Maignol
andauthored
feat: set button types as "button" for modal open and close buttons (#119)
Co-authored-by: Hugues Maignol <hugues@kime.tech>
1 parent 2fdabe2 commit 7010b0c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Modal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const Modal = memo(
9999
className={fr.cx("fr-btn--close", "fr-btn")}
100100
title={t("close")}
101101
aria-controls={id}
102+
type="button"
102103
>
103104
{t("close")}
104105
</button>
@@ -231,7 +232,8 @@ export function createModal<Name extends string>(params: {
231232
<Button
232233
nativeButtonProps={{
233234
...modalNativeButtonProps,
234-
"id": hiddenControlButtonId
235+
"id": hiddenControlButtonId,
236+
"type": "button"
235237
}}
236238
className={fr.cx("fr-hidden")}
237239
>

0 commit comments

Comments
 (0)