From bc5ea9cf00ed2a5d0ca7d8554b824a0b3ec75822 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Fri, 7 Aug 2020 16:18:15 -0400 Subject: [PATCH] Fix link button type bug --- CHANGELOG.md | 4 ++++ src/components/button/button.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c435f4cb..4e56714a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.0-beta.13 + +- Fixed a bug where link buttons would have `type="button"` + ## 2.0.0-beta.12 - Added support for `href`, `target`, and `download` to buttons diff --git a/src/components/button/button.tsx b/src/components/button/button.tsx index 37a366e7..0ea08c78 100644 --- a/src/components/button/button.tsx +++ b/src/components/button/button.tsx @@ -140,7 +140,7 @@ export class Button { 'button--pill': this.pill }} disabled={this.disabled} - type={isButton && this.submit ? 'submit' : 'button'} + type={isButton ? (this.submit ? 'submit' : 'button') : null} name={isButton ? this.name : null} value={isButton ? this.value : null} href={isLink && this.href}