Skip to content
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

Merged
merged 2 commits into from
Jul 26, 2014
Merged

Conversation

KnisterPeter
Copy link
Contributor

No description provided.

@@ -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/));
Copy link
Contributor

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.

@stevoland
Copy link
Contributor

Thanks, just one minor comment.


getDefaultProps: function () {
return {
pullRight: false
Copy link
Contributor

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).

@KnisterPeter
Copy link
Contributor Author

Updated with your thoughts :)

@pieterv
Copy link
Contributor

pieterv commented Jul 26, 2014

@KnisterPeter Awesome, looks good to go!

pieterv added a commit that referenced this pull request Jul 26, 2014
Added pullRight prop to Badge
@pieterv pieterv merged commit b4ae66e into react-bootstrap:master Jul 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants