2020-08-17 15:07:16 -05:00
|
|
|
import React from 'react'
|
2020-08-17 15:59:29 -05:00
|
|
|
import PropTypes from 'prop-types'
|
2020-08-17 11:40:39 -05:00
|
|
|
import { CX } from '../constants'
|
2020-02-25 11:04:44 -05:00
|
|
|
|
2020-08-17 15:07:16 -05:00
|
|
|
export default class Icon extends React.PureComponent {
|
2020-02-25 11:04:44 -05:00
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
className: PropTypes.string,
|
2020-08-17 11:40:39 -05:00
|
|
|
id: PropTypes.string.isRequired,
|
2020-04-23 02:13:29 -04:00
|
|
|
size: PropTypes.string,
|
2020-02-25 11:04:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2020-08-17 11:40:39 -05:00
|
|
|
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} />
|
2020-02-25 11:04:44 -05:00
|
|
|
|
|
|
|
}
|
2020-04-07 21:06:59 -04:00
|
|
|
|
2020-02-25 11:04:44 -05:00
|
|
|
}
|