-
Notifications
You must be signed in to change notification settings - Fork 111
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
Conversation
… number. Also added jest test check no warnings happen when a string is used
lib/__tests__/react-loading.spec.jsx
Outdated
@@ -1,5 +1,6 @@ | |||
import React from 'react'; | |||
import { shallow } from 'enzyme'; | |||
import sinon from 'sinon'; |
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.
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([ |
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.
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?
@fakiolinho @dcgudeman any idea when this might be merged? |
@kgodey I can probably make the requested changes this weekend. After that it will be up to @fakiolinho |
@fakiolinho let me know if there are anymore changes you would like |
Also added jest test check no warnings happen when a string is used. This required adding sinon as a dependency.