UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

14 lines (13 loc) 841 B
import { jsx as _jsx } from "react/jsx-runtime"; import * as React from 'react'; import { CircleQuestion } from '@gravity-ui/icons'; import { Icon } from "../Icon/index.js"; import { Popover } from "../Popover/index.js"; import { block } from "../utils/cn.js"; import "./HelpMark.css"; const b = block('help-mark'); const ICON_SIZE = 16; export const HelpMark = React.forwardRef(function HelpMark({ children, qa, className, popoverProps, ...restProps }, ref) { return (_jsx(Popover, { content: _jsx("div", { className: b('popover'), children: children }), hasArrow: true, ...popoverProps, children: _jsx("button", { ...restProps, ref: ref, type: "button", className: b(null, className), "data-qa": qa, children: _jsx(Icon, { data: CircleQuestion, size: ICON_SIZE, className: b('icon') }) }) })); }); //# sourceMappingURL=HelpMark.js.map