import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; export default class Icon extends React.PureComponent { static propTypes = { id: PropTypes.string.isRequired, className: PropTypes.string, fixedWidth: PropTypes.bool, }; render() { const { id, className, fixedWidth, ...other } = this.props; // Use the Fork Awesome retweet icon, but change its alt // tag. There is a common adblocker rule which hides elements with // alt='retweet' unless the domain is twitter.com. This should // change what screenreaders call it as well. const alt_id = (id === 'retweet') ? 'repost' : id; return ( ); } }