Sha256: dfe67f7bcbff506ccbce33db5d5b642d941532f641ab77e90f8aa0cf86a1e1e6

Contents?: true

Size: 778 Bytes

Versions: 57

Compression:

Stored size: 778 Bytes

Contents

import React from 'react';
import { Label } from '@patternfly/react-core';

const EnvironmentLabels = (environments) => {
  const { environments: singleEnvironment, isDisabled } = environments || {};
  const { name } = singleEnvironment || {};
  const labelColor = isDisabled ? 'grey' : 'purple';
  switch (environments) {
  case Array:
    return environments.map(env => (
      <React.Fragment key={env.id} style={{ marginBottom: '5px' }}>
        <Label
          color={labelColor}
          isTruncated
        >{env.name}
        </Label>
      </React.Fragment>
    ));
  default:
    return (
      <React.Fragment>
        <Label color={labelColor} isTruncated>
          {name}
        </Label>
      </React.Fragment>
    );
  }
};

export default EnvironmentLabels;

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
katello-4.14.3 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.14.2 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.15.0 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.15.0.rc2 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.15.0.rc1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.14.1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.14.0 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.14.0.rc3 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.14.0.rc2 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.14.0.rc1.1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.14.0.rc1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.13.1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.13.0 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.12.1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.13.0.rc1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.12.0 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.12.0.rc3 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.12.0.rc2 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.12.0.rc1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.11.1 webpack/scenes/ContentViews/components/EnvironmentLabels.js