Skip to content

Commit

Permalink
Fixed Button p-badge rendered twice (#4746)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Aug 7, 2023
1 parent df32738 commit 4791625
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/lib/button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const Button = React.memo(
if (props.badge) {
const badgeProps = mergeProps(
{
className: classNames('p-badge', props.badgeClassName),
className: classNames(props.badgeClassName),
value: props.badge,
unstyled: props.unstyled
},
Expand Down
6 changes: 3 additions & 3 deletions components/lib/button/__snapshots__/Button.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ exports[`Button when badge is true it renders Button with badge 1`] = `
 
</span>
<span
class="p-badge p-component p-badge"
class="p-badge p-component"
data-pc-name="badge"
data-pc-section="root"
>
Expand Down Expand Up @@ -218,7 +218,7 @@ exports[`Button when using badge and label the aria-label should contain both va
test
</span>
<span
class="p-badge p-component p-badge"
class="p-badge p-component"
data-pc-name="badge"
data-pc-section="root"
>
Expand All @@ -243,7 +243,7 @@ exports[`Button when using badge and label the aria-label should contain both va
test
</span>
<span
class="p-badge p-component p-badge"
class="p-badge p-component"
data-pc-name="badge"
data-pc-section="root"
>
Expand Down

0 comments on commit 4791625

Please sign in to comment.