Sha256: da819042d60692ecd1805ca90bb4045c92e4c3acbf695c37576eb517f8f189c7

Contents?: true

Size: 705 Bytes

Versions: 8

Compression:

Stored size: 705 Bytes

Contents

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

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

export default EnvironmentLabels;

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
katello-4.4.2.2 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.4.2.1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.4.2 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.4.1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.4.0.2 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.4.0.1 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.4.0 webpack/scenes/ContentViews/components/EnvironmentLabels.js
katello-4.4.0.rc2 webpack/scenes/ContentViews/components/EnvironmentLabels.js