-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Added pullRight prop to Badge #162
Conversation
@@ -16,9 +16,14 @@ describe('Badge', function () { | |||
assert.ok(instance.getDOMNode().className.match(/\bbadge\b/)); | |||
}); | |||
|
|||
it('Should have a badge class pulled right', function () { | |||
var instance = ReactTestUtils.renderIntoDocument(Badge({pullRight: true}, 'Content')); | |||
assert.ok(instance.getDOMNode().className.match(/\bpull-right badge\b/)); |
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.
Just /\bpull-right\b/
is good here. Or a separate assertion for badge
. We're not bothered about the order.
Thanks, just one minor comment. |
|
||
getDefaultProps: function () { | ||
return { | ||
pullRight: false |
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.
This default isn't necessary since an undefined
value will be evaluated as falsey when using non strict equality (such as classSet
uses).
Updated with your thoughts :) |
@KnisterPeter Awesome, looks good to go! |
No description provided.