From 48adb8d98657b550e05a94fc21fa8a95261e289c Mon Sep 17 00:00:00 2001 From: Shakira Reid-Thomas Date: Fri, 2 Aug 2024 11:21:18 -0400 Subject: [PATCH] Changed close, primary and disableStatus to hasAttribute --- src/components/atoms/Button/Button.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/atoms/Button/Button.js b/src/components/atoms/Button/Button.js index dd2f2948..9fa453d9 100644 --- a/src/components/atoms/Button/Button.js +++ b/src/components/atoms/Button/Button.js @@ -12,11 +12,11 @@ export default class Button extends HTMLElement { connectedCallback() { // Button attributes - const close = this.getAttribute('close'); + const close = this.hasAttribute('close'); const link = this.getAttribute('link'); const btnID = this.getAttribute('id'); const ariaLabel = this.getAttribute('aria-label'); - const primary = this.getAttribute('primary'); + const primary = this.hasAttribute('primary'); const backgroundColor = this.getAttribute('background-color'); const shape = this.getAttribute('shape'); const icon = this.getAttribute('icon'); @@ -28,7 +28,7 @@ export default class Button extends HTMLElement { const size = this.getAttribute('size'); const extraClasses = this.getAttribute('extra-classes'); const label = this.getAttribute('label'); - const disableStatus = this.getAttribute('disabled'); + const disableStatus = this.hasAttribute('disabled'); // Building Button component const btn = document.createElement('button'); const btnClasses = ['btn'];