Sha256: 26a039a5d65a120d2b285e421130341212a6dda5207980fdd717523c9d10750f
Contents?: true
Size: 741 Bytes
Versions: 20
Compression:
Stored size: 741 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> ); }; export const isPositiveNumber = text => parseInt(text, 10) > 0; export const isValidDate = d => d instanceof Date && !Number.isNaN(d);
Version data entries
20 entries across 20 versions & 1 rubygems