Skip to content

Commit cdd7d77

Browse files
committed
Improve Avatar validation
1 parent a830c93 commit cdd7d77

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

components/avatar/Avatar.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, {PropTypes} from 'react';
22
import FontIcon from '../font_icon';
33
import style from './style';
44

@@ -14,11 +14,11 @@ const Avatar = ({children, className, icon, image, title, ...other}) => {
1414
};
1515

1616
Avatar.propTypes = {
17-
children: React.PropTypes.node,
18-
className: React.PropTypes.string,
19-
icon: React.PropTypes.string,
20-
image: React.PropTypes.string,
21-
title: React.PropTypes.string
17+
children: PropTypes.node,
18+
className: PropTypes.string,
19+
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
20+
image: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
21+
title: PropTypes.string
2222
};
2323

2424
export default Avatar;

0 commit comments

Comments
 (0)