UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

18 lines (17 loc) 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HelpMark = void 0; const tslib_1 = require("tslib"); const jsx_runtime_1 = require("react/jsx-runtime"); const React = tslib_1.__importStar(require("react")); const icons_1 = require("@gravity-ui/icons"); const Icon_1 = require("../Icon/index.js"); const Popover_1 = require("../Popover/index.js"); const cn_1 = require("../utils/cn.js"); require("./HelpMark.css"); const b = (0, cn_1.block)('help-mark'); const ICON_SIZE = 16; exports.HelpMark = React.forwardRef(function HelpMark({ children, qa, className, popoverProps, ...restProps }, ref) { return ((0, jsx_runtime_1.jsx)(Popover_1.Popover, { content: (0, jsx_runtime_1.jsx)("div", { className: b('popover'), children: children }), hasArrow: true, ...popoverProps, children: (0, jsx_runtime_1.jsx)("button", { ...restProps, ref: ref, type: "button", className: b(null, className), "data-qa": qa, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { data: icons_1.CircleQuestion, size: ICON_SIZE, className: b('icon') }) }) })); }); //# sourceMappingURL=HelpMark.js.map