gab-social/app/javascript/gabsocial/components/icon.js
mgabdev a3670e8fec Updated Icon component to be adapted for font instead of svg
• Updated:
- Icon component to be adapted for font instead of svg
2020-08-17 11:40:39 -05:00

29 lines
531 B
JavaScript

import { CX } from '../constants'
export default class Icon extends PureComponent {
static propTypes = {
className: PropTypes.string,
id: PropTypes.string.isRequired,
size: PropTypes.string,
}
render() {
const {
className,
id,
size,
} = this.props
const additionalClasses = {}
additionalClasses.gfi = 1
additionalClasses[`gfi-${id}`] = 1
const classes = CX(className, additionalClasses)
return <i style={{ fontSize: size }} className={classes} />
}
}