UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

41 lines (40 loc) 1.33 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { IconChevronLeft } from '@coveord/plasma-react-icons'; import { Anchor, Flex, polymorphicFactory } from '@mantine/core'; import { useHeaderContext } from '../Header.context.js'; export const HeaderBreadcrumbAnchor = polymorphicFactory((props, ref)=>{ const { children, className, classNames, styles, style, single, ...others } = props; const ctx = useHeaderContext(); const content = single ? /*#__PURE__*/ _jsxs(Flex, { align: "center", ...ctx.getStyles('breadcrumbAnchorSingleGroup', { className, classNames, styles, style, props }), children: [ /*#__PURE__*/ _jsx(IconChevronLeft, { "aria-label": "arrow pointing back", size: 20 }), children ] }) : children; return /*#__PURE__*/ _jsx(Anchor, { ref: ref, inherit: true, ...ctx.getStyles('breadcrumbAnchor', { className, classNames, styles, style, props }), ...others, children: content }); }); HeaderBreadcrumbAnchor.displayName = 'Header.BreadcrumbAnchor'; //# sourceMappingURL=HeaderBreadcrumbAnchor.js.map