-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
refactor(Label): update props to the latest specs #474
Comments
Somewhat related - I'm having an issue with this line which adds the I'm trying to set a circular label with the // Currently
<Label text={count} circular />
<div class="ui empty circular label">11</div>
// To make it non-empty, needs children
<Label circular>{count}</Label>
<div class="ui circular label">11</div> I could see // Better (but still not completely intuitive):
<Label circular />
<div class="ui empty circular label"></div>
// Ideal:
<Label empty circular />
<div class="ui empty circular label"></div> |
Yep, that's bad. See https://github.com/TechnologyAdvice/stardust/issues/485 |
Actually, let's just do this all at once, updated description above. |
Fixed in #486 |
Shorthand
Currently, the Label allows shorthand props
icon
,image
, andtext
along withchildren
. These should bedisallow()
ed viapropTypes
and early returns put in place to render one or the other.text
This prop should be renamed to
content
. See #391.link
This prop renders as an
a
tag. It should go away as we now have augmentation<Label as='a' />
instead.empty
Currently, the Label auto applies the
empty
className when there are no children. Magic is bad, unless it is magic application of something that is always required, like a Checkbox fitted prop. A Label with no children does not always require theempty
class. It is a slightly larger but valid Label without it:We should remove the auto application of this className.
Docs & Tests
Docs and tests should then be updated for all usages.
The text was updated successfully, but these errors were encountered: