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

fix(Header): Fix image prop #545

Merged
merged 4 commits into from
Sep 25, 2016
Merged

fix(Header): Fix image prop #545

merged 4 commits into from
Sep 25, 2016

Conversation

layershifter
Copy link
Member

Fixes #542.

@@ -53,7 +54,7 @@ function Header(props) {
)
}

if (image || icon && typeof icon !== 'boolean') {
if ((image && typeof image !== 'boolean') || (icon && typeof icon !== 'boolean')) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impoved condition.

.should.not.have.className('icon')
it('does not add an Image when true', () => {
shallow(<Header image />)
.should.not.have.descendants('Image')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added test.

useKeyOnly(inverted, 'inverted'),
useKeyOnly(disabled, 'disabled'),
useKeyOnly(sub, 'sub'),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorted props.

@codecov-io
Copy link

codecov-io commented Sep 24, 2016

Current coverage is 98.86% (diff: 100%)

Merging #545 into master will not change coverage

@@             master       #545   diff @@
==========================================
  Files           108        108          
  Lines          1764       1764          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           1744       1744          
  Misses           20         20          
  Partials          0          0          

Powered by Codecov. Last update 650d1d8...9736c6e

…into fix/header-prop

Conflicts:
	test/specs/elements/Header/Header-test.js
Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment, then good to merge.

@@ -69,7 +80,14 @@ describe('Header', () => {
})

describe('subheader', () => {
it('adds HeaderSubheader as child when there is an icon', () => {
it('adds HeaderSubheader as child', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should be covered by implementsShorthandProp() for subheader. Should be able to remove it without a change in coverage.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like issue with merge, now okay.

…into fix/header-prop

Conflicts:
	test/specs/elements/Header/Header-test.js
@levithomason levithomason merged commit 94de48f into master Sep 25, 2016
@levithomason levithomason deleted the fix/header-prop branch September 25, 2016 15:18
@levithomason
Copy link
Member

Released in [email protected], thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants