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

updated propTypes for height and width to be union type of string and number. #53

Merged
merged 2 commits into from
Jul 12, 2018

Conversation

dcgudeman
Copy link
Contributor

Also added jest test check no warnings happen when a string is used. This required adding sinon as a dependency.

… number. Also added jest test check no warnings happen when a string is used
@coveralls
Copy link

coveralls commented May 17, 2018

Coverage Status

Coverage remained the same at 75.0% when pulling 4d6b6cb on dcgudeman:propType-change into 00016c5 on fakiolinho:master.

@@ -1,5 +1,6 @@
import React from 'react';
import { shallow } from 'enzyme';
import sinon from 'sinon';
Copy link
Owner

@fakiolinho fakiolinho Jun 7, 2018

Choose a reason for hiding this comment

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

Do we need sinon since we have jest? Not sure but i think that this might work:

jest.spyOn(global.console, 'error')

@@ -8,8 +8,14 @@ export default class Loading extends Component {
color: PropTypes.string,
delay: PropTypes.number,
type: PropTypes.string,
height: PropTypes.number,
width: PropTypes.number,
height: PropTypes.oneOfType([
Copy link
Owner

Choose a reason for hiding this comment

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

Looks good. Could you please update readme.md accordingly. I think we need 1-2 examples to make this clear because i can see that many people get confused by these 2 props values. What do you think?

@kgodey
Copy link

kgodey commented Jul 6, 2018

@fakiolinho @dcgudeman any idea when this might be merged?

@dcgudeman
Copy link
Contributor Author

@kgodey I can probably make the requested changes this weekend. After that it will be up to @fakiolinho

@dcgudeman
Copy link
Contributor Author

@fakiolinho let me know if there are anymore changes you would like

@fakiolinho fakiolinho merged commit 21aed74 into fakiolinho:master Jul 12, 2018
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.

4 participants