2023-02-11 09:40:43 +00:00
|
|
|
import React, { Fragment } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { UncontrolledTooltip } from 'reactstrap';
|
|
|
|
import { gettext } from '../utils/constants';
|
|
|
|
|
|
|
|
const propTypes = {
|
2024-06-17 01:32:05 +00:00
|
|
|
repoID: PropTypes.string.isRequired,
|
|
|
|
className: PropTypes.string
|
2023-02-11 09:40:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class RepoMonitoredIcon extends React.Component {
|
|
|
|
|
|
|
|
render() {
|
2024-06-17 01:32:05 +00:00
|
|
|
const { repoID, className } = this.props;
|
2023-02-11 09:40:43 +00:00
|
|
|
return (
|
|
|
|
<Fragment>
|
2024-06-17 01:32:05 +00:00
|
|
|
<i id={`watching-${repoID}`} className={`sf3-font-monitor sf3-font ${className ? className : ''}`}></i>
|
2023-02-11 09:40:43 +00:00
|
|
|
<UncontrolledTooltip
|
|
|
|
placement="bottom"
|
|
|
|
target={`#watching-${repoID}`}
|
|
|
|
>
|
|
|
|
{gettext('You are watching file changes of this library.')}
|
|
|
|
</UncontrolledTooltip>
|
|
|
|
</Fragment>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RepoMonitoredIcon.propTypes = propTypes;
|
|
|
|
|
|
|
|
export default RepoMonitoredIcon;
|