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.15.0.rc2 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.15.0.rc1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.14.1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.14.0 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.14.0.rc3 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.14.0.rc2 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.14.0.rc1.1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.14.0.rc1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.13.1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.13.0 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.12.1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.13.0.rc1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.12.0 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.12.0.rc3 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.12.0.rc2 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.12.0.rc1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.11.1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.11.0 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.11.0.rc2 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js
katello-4.11.0.rc1 webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js