@atlaskit/tooltip
Version:
A tooltip briefly describes an interactive element on mouse hover or keyboard focus.
45 lines (44 loc) • 1.41 kB
JavaScript
/* 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';
const 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.
*/
const TooltipContainer = /*#__PURE__*/forwardRef(function TooltipContainer({
style,
className,
children,
truncate,
placement,
testId,
onMouseOut,
onMouseOver,
id,
shortcut,
role
}, ref) {
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;