From 9f1e888997429beeba030b3fbf43e06a47f70fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Sch=C3=A4r?= <59233938+schaertim@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:39:31 +0100 Subject: [PATCH] chore(components): added type=button to prevent form submission (#4332) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alizé Debray <33580481+alizedebray@users.noreply.github.com> --- .changeset/early-baboons-cross.md | 5 +++++ .../src/components/post-closebutton/post-closebutton.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/early-baboons-cross.md diff --git a/.changeset/early-baboons-cross.md b/.changeset/early-baboons-cross.md new file mode 100644 index 0000000000..2d21811616 --- /dev/null +++ b/.changeset/early-baboons-cross.md @@ -0,0 +1,5 @@ +--- +'@swisspost/design-system-components': patch +--- + +Added a `type="button"` attribute to the `post-close-button` to prevent it from submitting forms. diff --git a/packages/components/src/components/post-closebutton/post-closebutton.tsx b/packages/components/src/components/post-closebutton/post-closebutton.tsx index 0d447ab844..fbd679d15c 100644 --- a/packages/components/src/components/post-closebutton/post-closebutton.tsx +++ b/packages/components/src/components/post-closebutton/post-closebutton.tsx @@ -14,7 +14,7 @@ export class PostClosebutton { render() { return ( -