-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rithm add prop types #16
Changes from 7 commits
4c0ba57
882f006
3a48940
fd29637
14ffcea
0ea5d9c
b5a0841
84a1b7a
ab4164e
014b531
738b27a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import './ErrorToast.css'; | ||
|
||
const ErrorToast = ({ message }) => { | ||
|
@@ -10,6 +11,10 @@ const ErrorToast = ({ message }) => { | |
); | ||
}; | ||
|
||
ErrorToast.propTypes = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Be consistent -- propTypes before defaultProps or vice versa, not one or the other. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
message: PropTypes.string.isRequired | ||
}; | ||
|
||
ErrorToast.defaultProps = { | ||
message: '' | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ afterEach(cleanup); | |
|
||
describe('<SidebarButton/>', () => { | ||
it('renders without crashing', () => { | ||
global.renderWithRedux(<SidebarButton />); | ||
global.renderWithRedux(<SidebarButton icon="icon" />); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this addition do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed, no longer needed with default props added |
||
}); | ||
|
||
it('renders appropriate content', () => { | ||
|
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.
Remove
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.
Removed