UNPKG

@pantheon-systems/design-toolkit-react

Version:
35 lines (32 loc) 956 B
import { faQuestionCircle } from '@fortawesome/pro-solid-svg-icons'; import Tippy from '@tippyjs/react'; import PropTypes from 'prop-types'; import Icon from '../Icons/Icon.js'; import { jsx } from 'react/jsx-runtime'; var TooltipQuestion = function TooltipQuestion(_ref) { var label = _ref.label; return /*#__PURE__*/jsx(Tippy, { animation: "fade", arrow: true, content: label, interactive: true, placement: "bottom", children: /*#__PURE__*/jsx("span", { className: "inline-block text-gray-4 focus:text-gray-6 hover:text-gray-6", "data-testid": "tooltip-span", tabIndex: "0", children: /*#__PURE__*/jsx(Icon, { icon: faQuestionCircle }) }) }); }; TooltipQuestion.propTypes = { /** * Text within tooltip. */ label: PropTypes.string.isRequired }; var TooltipQuestion$1 = TooltipQuestion; export { TooltipQuestion$1 as default }; //# sourceMappingURL=TooltipQuestion.js.map