7e47bb1d9c
• Removed: - prop-types global import, added to files directly
31 lines
598 B
JavaScript
31 lines
598 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import { CX } from '../constants'
|
|
|
|
export default class Icon extends React.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} />
|
|
|
|
}
|
|
|
|
}
|