mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
28 lines
677 B
JavaScript
28 lines
677 B
JavaScript
import React, { Component, PropTypes } from 'react';
|
|
import classnames from 'classnames';
|
|
|
|
const baseClass = 'kolidecon';
|
|
|
|
export class Icon extends Component {
|
|
static propTypes = {
|
|
className: PropTypes.string,
|
|
fw: PropTypes.bool,
|
|
name: PropTypes.string.isRequired,
|
|
size: PropTypes.string,
|
|
title: PropTypes.string,
|
|
};
|
|
|
|
render () {
|
|
const { className, fw, name, size, title } = this.props;
|
|
const iconClasses = classnames(baseClass, `${baseClass}-${name}`, className, {
|
|
[`${baseClass}-fw`]: fw,
|
|
[`${baseClass}-${size}`]: size,
|
|
});
|
|
|
|
return (
|
|
<i className={iconClasses} title={title} />
|
|
);
|
|
}
|
|
}
|
|
|
|
export default Icon;
|