@graphiql/react
Version:
[Changelog](https://github.com/graphql/graphiql/blob/main/packages/graphiql-react/CHANGELOG.md) | [API Docs](https://graphiql-test.netlify.app/typedoc/modules/graphiql_react.html) | [NPM](https://www.npmjs.com/package/@graphiql/react)
58 lines (57 loc) • 1.35 kB
JavaScript
import { jsx, jsxs } from "react/jsx-runtime";
import { c } from "react-compiler-runtime";
import * as T from "@radix-ui/react-tooltip";
/* empty css */
const TooltipRoot = (t0) => {
const $ = c(10);
const {
children,
align: t1,
side: t2,
sideOffset: t3,
label
} = t0;
const align = t1 === void 0 ? "start" : t1;
const side = t2 === void 0 ? "bottom" : t2;
const sideOffset = t3 === void 0 ? 5 : t3;
let t4;
if ($[0] !== children) {
t4 = /* @__PURE__ */ jsx(T.Trigger, { asChild: true, children });
$[0] = children;
$[1] = t4;
} else {
t4 = $[1];
}
let t5;
if ($[2] !== align || $[3] !== label || $[4] !== side || $[5] !== sideOffset) {
t5 = /* @__PURE__ */ jsx(T.Portal, { children: /* @__PURE__ */ jsx(T.Content, { className: "graphiql-tooltip", align, side, sideOffset, children: label }) });
$[2] = align;
$[3] = label;
$[4] = side;
$[5] = sideOffset;
$[6] = t5;
} else {
t5 = $[6];
}
let t6;
if ($[7] !== t4 || $[8] !== t5) {
t6 = /* @__PURE__ */ jsxs(T.Root, { children: [
t4,
t5
] });
$[7] = t4;
$[8] = t5;
$[9] = t6;
} else {
t6 = $[9];
}
return t6;
};
const Tooltip = Object.assign(TooltipRoot, {
Provider: T.Provider
});
export {
Tooltip,
TooltipRoot
};
//# sourceMappingURL=index.js.map