Sha256: df98074852fc7e6af6e881ee6e8f64ffdd76ee05580bd0740656fd1d67d5f953

Contents?: true

Size: 849 Bytes

Versions: 189

Compression:

Stored size: 849 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { ListView, OverlayTrigger, Tooltip } from 'patternfly-react';

import { getTypeIcon } from '../../../services/index';

export default class RepositoryTypeIcon extends React.Component {
  constructor(props) {
    super(props);

    this.tooltipId = `type-tooltip-${props.id}`;
  }

  render() {
    const typeIcon = getTypeIcon(this.props.type);

    return (
      <OverlayTrigger
        overlay={<Tooltip id={this.tooltipId}>{this.props.type}</Tooltip>}
        placement="bottom"
        trigger={['hover', 'focus']}
        rootClose={false}
      >
        <ListView.Icon name={typeIcon.name} size="sm" type={typeIcon.type} />
      </OverlayTrigger>
    );
  }
}

RepositoryTypeIcon.propTypes = {
  id: PropTypes.number.isRequired,
  type: PropTypes.string.isRequired,
};

Version data entries

189 entries across 189 versions & 1 rubygems

Version Path
katello-4.10.0 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.9.2 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.10.0.rc2 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.10.0.rc1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.8.4 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.9.1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.8.3 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.9.0 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.7.6 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.8.2 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.9.0.rc2 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.9.0.rc1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.8.1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.7.5 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.8.0 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.8.0.rc2 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.7.4 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.8.0.rc1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.7.3 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.7.2 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js