Skip to content

Commit

Permalink
chore(components): added type=button to prevent form submission (#4332)
Browse files Browse the repository at this point in the history
Co-authored-by: Alizé Debray <[email protected]>
  • Loading branch information
schaertim and alizedebray authored Dec 19, 2024
1 parent d4b578d commit 9f1e888
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/early-baboons-cross.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class PostClosebutton {
render() {
return (
<Host data-version={version}>
<button class="btn btn-icon-close">
<button class="btn btn-icon-close" type="button">
<post-icon aria-hidden="true" name="closex"></post-icon>
<span class="visually-hidden">
<slot></slot>
Expand Down

0 comments on commit 9f1e888

Please sign in to comment.