Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow navigation component items to take badge sub-components #462

Merged

Conversation

jayelkaake
Copy link
Contributor

Why?

Sometimes you want to show a a warning badge in the nav to direct people to that location to check some errors, but the current implementation only lets you set a value or nil.

What?

You can still set the value via the item badge attribute, however it will now also check for the sub-component so you can do this to show a critical errors count badge:

item.with_badge(status: :critical) { "1" }

@jayelkaake jayelkaake force-pushed the AllowItemBadgesToBeSubComponents branch from af0e110 to b46814b Compare January 28, 2025 16:00
@kirillplatonov kirillplatonov merged commit 282d530 into baoagency:main Feb 4, 2025
4 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants