a3670e8fec
• Updated: - Icon component to be adapted for font instead of svg
29 lines
531 B
JavaScript
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} />
|
|
|
|
}
|
|
|
|
}
|