import React, {PropTypes} from 'react'; import FontIcon from '../font_icon'; import style from './style'; const Avatar = ({children, className, icon, image, title, ...other}) => { return (
{children} {typeof image === 'string' ? : image} {typeof icon === 'string' ? : icon} {title ? {title[0]} : null}
); }; Avatar.propTypes = { children: PropTypes.node, className: PropTypes.string, icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), image: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), title: PropTypes.string }; export default Avatar;