UNPKG

@atlaskit/tooltip

Version:

A tooltip briefly describes an interactive element on mouse hover or keyboard focus.

44 lines (43 loc) 1.6 kB
/* tooltip-container.tsx generated by @compiled/babel-plugin v3.0.2 */ import "./tooltip-container.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; import { forwardRef } from 'react'; import TooltipPrimitive from './tooltip-primitive'; var styles = { base: "_2rkofajl _11c8wadc _vchhusvi _p12fp3fh _bfhk1aqn _syaz15cr _152tze3t _1e02ze3t _1i4q1hna _1q511b66 _85i51b66 _y4ti12x7 _bozg12x7 _slp31hna", truncate: "_1reo15vq _18m915vq _p12f1pna _1bto1l2s _o5721q9c" }; /** * Used as the default tooltip container component for the exported `Tooltip` component. * Adds some styles to the tooltip primitive. */ var TooltipContainer = /*#__PURE__*/forwardRef(function TooltipContainer(_ref, ref) { var style = _ref.style, className = _ref.className, children = _ref.children, truncate = _ref.truncate, placement = _ref.placement, testId = _ref.testId, onMouseOut = _ref.onMouseOut, onMouseOver = _ref.onMouseOver, id = _ref.id, shortcut = _ref.shortcut, role = _ref.role; return /*#__PURE__*/React.createElement(TooltipPrimitive, { ref: ref, style: style // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 , className: ax([styles.base, truncate && styles.truncate, className]), placement: placement, testId: testId, id: id, onMouseOut: onMouseOut, onMouseOver: onMouseOver, shortcut: shortcut, role: role }, children); }); TooltipContainer.displayName = 'TooltipContainer'; export default TooltipContainer;