You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Badge component should implement the Strong component. Pill will implement Badge with a rounded border radius, similar to how a Card implements Pane with a additional border radius prop.
Key implementation takeaways
Badge implements Strong from evergreen-typography
Pill implements Badge
Default height is 16px (line-height should be 16px for size=200)
Display inline-block
isSolid is false by default (defaultProps)
Default appearance is neutral (defaultProps)
Badge border radius should be 2px
Pill border radius should be 999px
Badge appearance
I think it makes sense to implement a isSolid bool prop that determines wether or not the badge or pill looks solid. In other implementations the value passed into the appearance prop maps directly to a object. In this case this is not possible because of the isSolid prop. Here is a approximation of the implementation:
In the design the neutral Badge/Pill uses neutral['500'] instead of neutral['1000']. Let's see how it looks with 1000 first before making an exception.
The text was updated successfully, but these errors were encountered:
evergreen-badges
is a package exporting aBadge
, andPill
React component.Usage
Design example
Usage
Pill
for numbers: 1-99Badge
for status: success, new, etc.Implementation details
The
Badge
component should implement theStrong
component.Pill
will implementBadge
with a rounded border radius, similar to how aCard
implementsPane
with a additional border radius prop.Key implementation takeaways
Badge
implementsStrong
fromevergreen-typography
Pill
implementsBadge
inline-block
isSolid
is false by default (defaultProps)neutral
(defaultProps)Badge
border radius should be2px
Pill
border radius should be999px
Badge appearance
I think it makes sense to implement a
isSolid
bool prop that determines wether or not the badge or pill looks solid. In other implementations the value passed into the appearance prop maps directly to a object. In this case this is not possible because of theisSolid
prop. Here is a approximation of the implementation:In the design the neutral Badge/Pill uses neutral['500'] instead of neutral['1000']. Let's see how it looks with 1000 first before making an exception.
The text was updated successfully, but these errors were encountered: