@gravity-ui/uikit
Version:
Gravity UI base styling and components
14 lines (13 loc) • 911 B
JavaScript
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 { ICON_SIZE_MAP } from "./constants.js";
import "./HelpMark.css";
const b = block('help-mark');
export const HelpMark = React.forwardRef(function HelpMark({ children, qa, className, iconSize = 'm', 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({ size: iconSize }, className), "data-qa": qa, children: _jsx(Icon, { data: CircleQuestion, size: ICON_SIZE_MAP[iconSize], className: b('icon') }) }) }));
});
//# sourceMappingURL=HelpMark.js.map