2018-06-13 14:53:41 -04:00
|
|
|
const classNames = require('classnames');
|
2018-06-13 14:05:20 -04:00
|
|
|
const React = require('react');
|
2018-06-13 14:53:41 -04:00
|
|
|
const PropTypes = require('prop-types');
|
2018-06-13 14:05:20 -04:00
|
|
|
require('./extension-chip.scss');
|
|
|
|
|
2018-06-13 14:53:41 -04:00
|
|
|
const ExtensionChip = props => (
|
|
|
|
<div className={classNames('extension-chip', {'has-status': props.hasStatus})}>
|
2018-06-13 14:05:20 -04:00
|
|
|
<img
|
|
|
|
className="extension-title"
|
2018-06-13 14:53:41 -04:00
|
|
|
src={props.iconSrc}
|
2018-06-13 14:05:20 -04:00
|
|
|
/>
|
|
|
|
<div className="extension-content">
|
2018-06-13 14:53:41 -04:00
|
|
|
<span>{props.extensionName}</span>
|
|
|
|
{props.hasStatus && (
|
|
|
|
<div className="extension-status">
|
|
|
|
Needs Connection
|
|
|
|
</div>
|
|
|
|
)}
|
2018-06-13 14:05:20 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
2018-06-13 14:53:41 -04:00
|
|
|
ExtensionChip.propTypes = {
|
|
|
|
extensionName: PropTypes.string,
|
|
|
|
hasStatus: PropTypes.boolean,
|
|
|
|
iconSrc: PropTypes.string
|
|
|
|
};
|
|
|
|
|
2018-06-13 14:05:20 -04:00
|
|
|
|
|
|
|
module.exports = ExtensionChip;
|