Sha256: c9985da605d97cbfd402a38e7da38dbef8d63c3ecccd6519e2f41c28bf66cd9a

Contents?: true

Size: 604 Bytes

Versions: 7

Compression:

Stored size: 604 Bytes

Contents

import React from 'react';
import { Popover } from '@patternfly/react-core';
import { HelpIcon } from '@patternfly/react-icons';
import { translate as __ } from 'foremanReact/common/I18n';

export const helpLabel = (text, id) => {
  if (!text) return null;
  return (
    <Popover id={`${id}-help`} bodyContent={text} aria-label="help-text">
      <button
        type="button"
        aria-label={__('open-help-tooltip-button')}
        onClick={e => e.preventDefault()}
        className="pf-c-form__group-label-help"
      >
        <HelpIcon noVerticalAlign />
      </button>
    </Popover>
  );
};

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
foreman_remote_execution-4.8.0 webpack/JobWizard/steps/form/FormHelpers.js
foreman_remote_execution-4.5.6 webpack/JobWizard/steps/form/FormHelpers.js
foreman_remote_execution-4.5.5 webpack/JobWizard/steps/form/FormHelpers.js
foreman_remote_execution-4.5.4 webpack/JobWizard/steps/form/FormHelpers.js
foreman_remote_execution-4.7.0 webpack/JobWizard/steps/form/FormHelpers.js
foreman_remote_execution-4.5.3 webpack/JobWizard/steps/form/FormHelpers.js
foreman_remote_execution-4.5.2 webpack/JobWizard/steps/form/FormHelpers.js