@coveord/plasma-mantine
Version:
A Plasma flavoured Mantine theme
64 lines (63 loc) • 2.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "HeaderDocAnchor", {
enumerable: true,
get: function() {
return HeaderDocAnchor;
}
});
var _object_spread = require("@swc/helpers/_/_object_spread");
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
var _jsxruntime = require("react/jsx-runtime");
var _plasmareacticons = require("@coveord/plasma-react-icons");
var _core = require("@mantine/core");
var _Headercontext = require("../Header.context");
var defaultProps = {
position: 'right',
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_plasmareacticons.QuestionSize16Px, {
height: 16
})
};
var HeaderDocAnchor = (0, _core.factory)(function(_props, ref) {
var props = (0, _core.useProps)('PlasmaHeaderActions', defaultProps, _props);
var className = props.className, classNames = props.classNames, styles = props.styles, style = props.style, children = props.children, label = props.label, position = props.position, vars = props.vars, others = _object_without_properties._(props, [
"className",
"classNames",
"styles",
"style",
"children",
"label",
"position",
"vars"
]);
var ctx = (0, _Headercontext.useHeaderContext)();
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Tooltip, {
label: label,
disabled: !label,
position: position,
classNames: {
tooltip: ctx.getStyles('docAnchorTooltip', {
classNames: classNames,
styles: styles,
props: props
}).className
},
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Anchor, _object_spread_props._(_object_spread._({
ref: ref,
inline: true,
target: "_blank"
}, ctx.getStyles('docAnchor', {
classNames: classNames,
styles: styles,
props: props,
style: style,
className: className
}), others), {
children: children
}))
});
});
//# sourceMappingURL=HeaderDocAnchor.js.map