Skip to content

Commit

Permalink
Merge pull request #601 from SUI-Components/feature/XCOMP-9946/topbar…
Browse files Browse the repository at this point in the history
…-user

feat(components/topbar/user): Hide user badge
  • Loading branch information
IsabelGomez87 committed Jul 5, 2023
2 parents 57c0bba + 1d94bfc commit 8b2c1a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/topbar/user/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@s-ui/component-dependencies": "1",
"@s-ui/react-atom-button": "1",
"@s-ui/react-dropdown-basic": "1",
"@s-ui/react-dropdown-user": "1",
"@s-ui/react-dropdown-user": "3",
"@s-ui/react-hooks": "1",
"@s-ui/react-icons": "1"
}
Expand Down
9 changes: 7 additions & 2 deletions components/topbar/user/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default function TopbarUser({
const Link = linkFactory
const ToggleIcon = toggleIcon
const {image: BrandImage, name: brandName, url: brandUrl} = brand
const {avatar, name, menu} = navUser
const {avatar, name, menu, hasUserBadgeLabel} = navUser
const navWrapClassName = cx('sui-TopbarUser-navWrap', {
'is-expanded': menuExpanded
})
Expand Down Expand Up @@ -224,6 +224,7 @@ export default function TopbarUser({
expandOnMouseOver
hasNotifications={hasNotifications && !menuExpanded}
linkFactory={linkFactory}
hasBadgeLabel={hasUserBadgeLabel}
/>
</div>
)}
Expand Down Expand Up @@ -361,7 +362,11 @@ TopbarUser.propTypes = {
*/
highlight: PropTypes.bool
})
)
),
/**
* hasUserBadgeLabel to show a counter in the badge notification.
*/
hasUserBadgeLabel: PropTypes.bool
}).isRequired,
/**
* Render custom content instead of a CTA.
Expand Down

0 comments on commit 8b2c1a7

Please sign in to comment.