-
Notifications
You must be signed in to change notification settings - Fork 1
✨ Add badge component #107
base: master
Are you sure you want to change the base?
Conversation
UIKit Storybook for Review Built with commit 6a549bb |
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.
good start, a couple tweaks and I think we need to define the difference between a badge and a tag and what colors mean instead of maybe allowing users to use any color
* Displays badge describing the file state | ||
*/ | ||
const Badge = ({ className, state, color, loading }) => { | ||
const badgeColor = color ? `bg-${color}` : null; |
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.
@dankolbman should we leave this as a utility class or make specific BEM classes for color. I kind of think there should be specific BEM classes for colors that follow a standard like Badge--error
Badge--success
etc
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.
yeah that sounds good, if those different state -> colors are defined of course.
I think the idea here was to provide consistent state -> color mappings for content. Perhaps we want to allow the color to be over-ridable for use cases where app-specific states are needed?
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.
so you're saying leave it as is for or change it up to make it BEM classes?
Story book is returning an error :( |
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.
small percy tweak again and waiting on some color discussion with @dankolbman
* Displays badge describing the file state | ||
*/ | ||
const Badge = ({ className, state, color, loading }) => { | ||
const badgeColor = color ? `bg-${color}` : null; |
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.
so you're saying leave it as is for or change it up to make it BEM classes?
f5a9557
to
558e395
Compare
Agreed, I think @allisonheath wanted to be part of that discussion as well as it involves brand standards |
I don't think I necessarily need to be there for the initial discussions/ideas, but if you all can come up with an option or two I can review/inform. |
73a0903
to
9c6e0b5
Compare
Motivation
Adds badge component for labels and stats.
Use Cases
Kids First Data Tracker
Kids First Coordinator
Kids First Portal
API changes
No API changes are made on this component.
Implementation Notes
Referencing
Colors
in the storybook and color options.Rendering and Storybook location
Functional Tests
Test badge component under all the color options and on loading or not.