-
Notifications
You must be signed in to change notification settings - Fork 840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bolder, smaller badges with onclick events and custom colors #381
Conversation
Sorry to bring this up here... But why is this component named "badge".. The more common term for this is a "pill". A badge is usually a... well... a badge you attach/place on other components (like the little number that is places on the email icon indicating how many unread emails you have in your mailbox.... or a "fork me" badge on an open source web page) |
@uboness I try to stick to convention when I can and usually look at the "Big Two" when considering naming. While similar "Pills" normally describe input level or navigational elements (A "pill bar" for example). Both Bootstrap and Foundation use the badge terminology. Our usage is definitely in the "badge" vein.
Pills used for navigation terminology |
I'll admit the naming is murky out in the wild across all these systems. I think the terms are fairly synonymous in most cases. |
naming is and will always be hard.. the way I look at it - search google images for these terms and get a feel of what's more common the not:
from the above, as I expected, a badge more commonly serves as an attachment to another component or to the page. Interestingly enough though, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks for making these improvements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a small typo in the docs.
}], | ||
text: ( | ||
<p> | ||
Badges can have onClick events applied to the badge itself or the icon within the tab. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"...icon within the badge."
}; | ||
|
||
EuiBadge.propTypes = { | ||
children: PropTypes.node, | ||
className: PropTypes.string, | ||
|
||
/** | ||
* Accepts any string from our icon library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever, I didn't realize that these comments were then translated into the Notes section of the props documentation.
@uboness Merge, gonna keep named how they are mostly because they're already out in the wild in use in Cloud / Kibana and causes us less headache. We can always switch it around later, but people haven't had too much trouble finding them. |
This changes the visuals of badges to be a little bolder with a smaller footprint.
TODO:
EuiFlexGroup
to prevent smooshed second line wrapping in tables.