Skip to content

fix: apply bold fontWeight to active BottomNavigation.Bar label - #5049

Open
ErfanBagheri404 wants to merge 2 commits into
callstack:mainfrom
ErfanBagheri404:fix/bottom-nav-active-label-fontweight
Open

fix: apply bold fontWeight to active BottomNavigation.Bar label#5049
ErfanBagheri404 wants to merge 2 commits into
callstack:mainfrom
ErfanBagheri404:fix/bottom-nav-active-label-fontweight

Conversation

@ErfanBagheri404

Copy link
Copy Markdown

Fixes #4780

MD3 spec requires the active navigation bar label to be bold (weight 700). Previously the same font was applied to both active and inactive labels.

Added fontWeight: 700 to the active label Text style in BottomNavigationBar.tsx.

MD3 spec requires the active navigation bar label to be bold (weight 700).
Previously the same font was applied to active and inactive labels.

Fixes callstack#4780

@MikitasK MikitasK left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 👌
just one comment from my side:

Comment on lines 716 to 718
color: activeLabelColor,
fontWeight: '700' as TextStyle['fontWeight'],
...font,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...font includes labelMedium font weight (500) & currently overwrites 700
wdyt about moving fontWeight after ...font?

Suggested change
color: activeLabelColor,
fontWeight: '700' as TextStyle['fontWeight'],
...font,
color: activeLabelColor,
...font,
fontWeight: '700' as TextStyle['fontWeight'],

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello, thanks for reviewing! ill apply the changes right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BottomNavigation.Bar applies wrong fontWeight to active label

2 participants