Simple fix for tuncation and padding of value text #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reverts the need to add a new class to component simply when the
label
is present. You can easily adjust the styles of an element based on the presence of an element that comes before it with the sibling selector.This also adjusts how the flex is handled to prioritize the
valueText
. I know this seems backward because the more important piece of data is the label. However, for the use case of this particular instnace, I'm expecting engineers to have control over the size of thevalue
by rounding and such, but they most likely won't have control over thelabel
. So if they see there is like 18 decimals attached to the percentage forcing it to grow so wide the label falls off, they should be able to doMath.round(value)
before passing it in.Before
After