Summary
As part of the EuiBadge design update, we need to add support for light color variants activated via the new fill prop.
The fill prop should be optional, accept boolean values, and default to true since the existing badge colors are considered the filled variant. The light color variants can be found in the Figma file. The prop is named fill to match the EuiButton API.
Technical details
The light badge colors should be added to euiBadgeStyles and the euiBadgeColors function it uses to get the color values. Whenever fill = false the light colors should be used.
Color map
Color name (color prop) |
fill = true |
fill = false |
| default |
#5A6D8C |
#E3E8F2 |
| primary |
#0B64DD |
#D9E8FF |
| accent |
#BD1F70 |
#FDDDE9 |
| success |
#008A5E |
#C9F3E3 |
| warning |
#FACB3D |
#FDE9B5 |
| danger |
#BD271E |
#FDDDD8 |
| risk |
#ED6723 |
#FFDEBF |
| neutral |
#1C8CB5 |
#CFEEF7 |
hollow Includes a border |
#FFFFFF |
#FFFFFF |
Acceptance criteria
- The
fill?: boolean defaulting to true should be added to EuiBadgeProps
- Styles should be updated to use light badge colors when
fill = false
- Tests and stories should be updated to fully cover the new functionality and the
fill prop
- A VRT test should be added to test all badge colors (
fill = true and fill = false variants)
- There should be no regressions in the high contrast mode
- Both light and dark color schemes should be supported
Summary
As part of the EuiBadge design update, we need to add support for light color variants activated via the new
fillprop.The
fillprop should be optional, accept boolean values, and default totruesince the existing badge colors are considered the filled variant. The light color variants can be found in the Figma file. The prop is namedfillto match theEuiButtonAPI.Technical details
The light badge colors should be added to
euiBadgeStylesand theeuiBadgeColorsfunction it uses to get the color values. Wheneverfill = falsethe light colors should be used.Color map
colorprop)fill = truefill = false#5A6D8C#E3E8F2#0B64DD#D9E8FF#BD1F70#FDDDE9#008A5E#C9F3E3#FACB3D#FDE9B5#BD271E#FDDDD8#ED6723#FFDEBF#1C8CB5#CFEEF7Includes a border
#FFFFFF#FFFFFFAcceptance criteria
fill?: booleandefaulting totrueshould be added toEuiBadgePropsfill = falsefillpropfill = trueandfill = falsevariants)