-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EUI] Improve EuiFilterButton badge i18n (#5061)
* [setup] Misc variable refactors - Refactor `activeFilters` to `numActiveFiltersDefined` to be more consistent with existing `numFiltersDefined` var - pull out showBadge conditional to make reading it a little clearer - DRY out badgeCount var * Fix un-i18n'ed conditional active/available strings - Rather than trying to conditionally chop up the i18n string into parts, it makes more sense (and likely makes for better translations) to have 2 separate labels that render conditionally based on state + Switch from i18n render prop to use hook * [optional] Refactor badge JSX into a separate var to keep badge logic together - this feels more organized and easy to follow distinct groups of logic to me, but happy to revert if others disagree * Add changelog entry
- Loading branch information
Constance
authored
Aug 23, 2021
1 parent
264dc89
commit 155d967
Showing
2 changed files
with
27 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters