Skip to content

Commit 9ac8f1d

Browse files
committed
fix condition to show badge correctly
1 parent d380fc3 commit 9ac8f1d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
6262
- `<MultiSuggestField />`
6363
- `onSelection` now sets `newlySelected` only for add actions and no longer sets it to the last element
6464
- border of the BlueprintJS `Tag` elements were fixed
65+
- `<Button />`
66+
- badge is correctly displayed when `badge={0}`
6567
- Focus outlines
6668
- we use again bold focus outlines for input elements
6769
- they are also used for clickable elements that are focused via keyboard (tab navigation)

src/components/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const Button = ({
113113
rightIcon={typeof rightIcon === "string" ? <Icon name={rightIcon} /> : rightIcon}
114114
>
115115
{children}
116-
{badge && (
116+
{typeof badge !== "undefined" && (
117117
<Badge
118118
children={badge}
119119
{...constructBadgeProperties({

0 commit comments

Comments
 (0)