Skip to content

Commit c7e1ae2

Browse files
committed
Add proptype for className; update tests
1 parent 34fd47a commit c7e1ae2

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

__tests__/__snapshots__/HoverImage.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ ShallowWrapper {
2222
"key": null,
2323
"nodeType": "host",
2424
"props": Object {
25+
"className": undefined,
2526
"onClick": [Function],
2627
"onMouseOut": [Function],
2728
"onMouseOver": [Function],
@@ -38,6 +39,7 @@ ShallowWrapper {
3839
"key": null,
3940
"nodeType": "host",
4041
"props": Object {
42+
"className": undefined,
4143
"onClick": [Function],
4244
"onMouseOut": [Function],
4345
"onMouseOver": [Function],

build/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,8 @@ var HoverImage = function (_React$Component) {
516516
style: this.props.style,
517517
onMouseOver: this.mouseOver,
518518
onMouseOut: this.mouseOut,
519-
onClick: this.handleClick
519+
onClick: this.handleClick,
520+
className: this.props.className
520521
});
521522
}
522523
}]);

src/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class HoverImage extends React.Component {
3939
}
4040
HoverImage.propTypes = {
4141
hoverSrc: PropTypes.string.isRequired,
42-
src: PropTypes.string.isRequired
43-
}
42+
src: PropTypes.string.isRequired,
43+
className: PropTypes.string
44+
};
4445

4546
export default HoverImage

0 commit comments

Comments
 (0)