UNPKG

@atlaskit/tooltip

Version:

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

25 lines 1.16 kB
/* tooltip-shortcut.tsx generated by @compiled/babel-plugin v3.0.2 */ import "./tooltip-shortcut.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; var styles = { shortcutSegmentsContainer: "_zulpv77o _1e0c1txw _1q511b66 _85i5v77o", shortcutSegment: "_11c8wadc _2rkolb4i _1dqonqa1 _189ee4h9 _1h6d1ihb _1e0c1txw _4cvr1h6o _4t3i1k92 _vchhusvi _1q51v77o _85i5v77o _bozg12x7 _y4ti12x7 _16qsn7od _1254n7od _cgnln7od _syazn7od _ahbqn7od _12l2n7od _1pfhn7od _6rthn7od _1ul9n7od _w19jn7od _bfhk261p" }; /** * __Tooltip shortcut__ * * An internal component that is used to display a keyboard shortcut within a tooltip, showing each key * as a styled segment after the main tooltip content. */ export var TooltipShortcut = function TooltipShortcut(_ref) { var shortcut = _ref.shortcut; return /*#__PURE__*/React.createElement("div", { className: ax([styles.shortcutSegmentsContainer]) }, shortcut.map(function (segment, index) { return /*#__PURE__*/React.createElement("kbd", { key: "".concat(segment, "-").concat(index), className: ax([styles.shortcutSegment]) }, segment); })); };