Sha256: 54521e154cb2b3110041d05a976ab964a148e5b59111770efeb02316e9c5d9a3

Contents?: true

Size: 582 Bytes

Versions: 3

Compression:

Stored size: 582 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
        aria-label={__('open-help-tooltip-button')}
        onClick={e => e.preventDefault()}
        className="pf-c-form__group-label-help"
      >
        <HelpIcon noVerticalAlign />
      </button>
    </Popover>
  );
};

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_remote_execution-4.5.1 webpack/JobWizard/steps/form/FormHelpers.js
foreman_remote_execution-4.6.0 webpack/JobWizard/steps/form/FormHelpers.js
foreman_remote_execution-4.5.0 webpack/JobWizard/steps/form/FormHelpers.js