@coveord/plasma-mantine
Version:
A Plasma flavoured Mantine theme
60 lines (59 loc) • 2.2 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "HeaderBreadcrumbAnchor", {
enumerable: true,
get: function() {
return HeaderBreadcrumbAnchor;
}
});
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.js");
var HeaderBreadcrumbAnchor = (0, _core.polymorphicFactory)(function(props, ref) {
var children = props.children, className = props.className, classNames = props.classNames, styles = props.styles, style = props.style, single = props.single, others = _object_without_properties._(props, [
"children",
"className",
"classNames",
"styles",
"style",
"single"
]);
var ctx = (0, _Headercontext.useHeaderContext)();
var content = single ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Flex, _object_spread_props._(_object_spread._({
align: "center"
}, ctx.getStyles('breadcrumbAnchorSingleGroup', {
className: className,
classNames: classNames,
styles: styles,
style: style,
props: props
})), {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_plasmareacticons.IconChevronLeft, {
"aria-label": "arrow pointing back",
size: 20
}),
children
]
})) : children;
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Anchor, _object_spread_props._(_object_spread._({
ref: ref,
inherit: true
}, ctx.getStyles('breadcrumbAnchor', {
className: className,
classNames: classNames,
styles: styles,
style: style,
props: props
}), others), {
children: content
}));
});
HeaderBreadcrumbAnchor.displayName = 'Header.BreadcrumbAnchor';
//# sourceMappingURL=HeaderBreadcrumbAnchor.js.map