Skip to content

Commit

Permalink
Updated close logic and removed ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
sreidthomas committed Aug 2, 2024
1 parent 8aecc85 commit 7db74a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/atoms/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export default class Button extends HTMLElement {
imgAlt
? btnClasses.push('cod-button--img')
: btnClasses.push('cod-button--not-img');
close === 'true' ? btnClasses.push('btn-close') : 0;
if (close) {
btnClasses.push('btn-close');
}
btn.className = btnClasses.join(' ');

if (icon) {
Expand Down

0 comments on commit 7db74a7

Please sign in to comment.