Skip to content

Commit

Permalink
Change badge style globally
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-solecki committed Feb 20, 2024
1 parent e597e1a commit f67a9b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/components/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,9 @@ function MenuItem(
textStyles={styles.textStrong}
badgeStyles={[
styles.alignSelfCenter,
styles.badgeBordered,
brickRoadIndicator ? styles.mr2 : undefined,
focused || isHovered || pressed ? styles.buttonHoveredBG : {},
focused || isHovered || pressed ? styles.activeItemBadge : {},
badgeStyle,
]}
/>
Expand Down
6 changes: 1 addition & 5 deletions src/pages/settings/InitialSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ function InitialSettingsPage(props) {
{_.map(menuItemsData.items, (item, index) => {
const keyTitle = item.translationKey ? translate(item.translationKey) : item.title;
const isPaymentItem = item.translationKey === 'common.wallet';
const isFocusedItem = activeRoute && item.routeName && activeRoute.toLowerCase().replaceAll('_', '') === item.routeName.toLowerCase().replaceAll('/', '');

return (
<MenuItem
Expand All @@ -286,7 +285,6 @@ function InitialSettingsPage(props) {
})}
iconStyles={item.iconStyles}
badgeText={getWalletBalance(isPaymentItem)}
badgeStyle={[styles.badgeBordered, isFocusedItem ? styles.activeItemBadge : undefined]}
fallbackIcon={item.fallbackIcon}
brickRoadIndicator={item.brickRoadIndicator}
floatRightAvatars={item.floatRightAvatars}
Expand All @@ -296,7 +294,7 @@ function InitialSettingsPage(props) {
hoverAndPressStyle={styles.hoveredComponentBG}
shouldBlockSelection={Boolean(item.link)}
onSecondaryInteraction={item.link ? (event) => openPopover(item.link, event) : undefined}
focused={isFocusedItem}
focused={activeRoute && item.routeName && activeRoute.toLowerCase().replaceAll('_', '') === item.routeName.toLowerCase().replaceAll('/', '')}
isPaneMenu
iconRight={item.iconRight}
shouldShowRightIcon={item.shouldShowRightIcon}
Expand All @@ -307,8 +305,6 @@ function InitialSettingsPage(props) {
);
},
[
styles.badgeBordered,
styles.activeItemBadge,
styles.pb4,
styles.mh3,
styles.sectionTitle,
Expand Down

0 comments on commit f67a9b2

Please sign in to comment.