@mantine/code-highlight
Version:
Code highlight with Mantine theme
41 lines (37 loc) • 1.42 kB
JavaScript
'use client';
;
var jsxRuntime = require('react/jsx-runtime');
var core = require('@mantine/core');
var CodeHighlight = require('./CodeHighlight.cjs');
var CodeHighlight_module = require('../CodeHighlight.module.css.cjs');
const defaultProps = {};
const varsResolver = core.createVarsResolver(
(theme, { background, radius }) => ({
inlineCodeHighlight: {
"--ch-background": background ? core.getThemeColor(background, theme) : void 0,
"--ch-radius": typeof radius !== "undefined" ? core.getRadius(radius) : void 0
}
})
);
const InlineCodeHighlight = core.factory((_props, ref) => {
const props = core.useProps("InlineCodeHighlight", defaultProps, _props);
const { classNames, className, style, styles, unstyled, vars, ...others } = props;
const getStyles = core.useStyles({
name: "InlineCodeHighlight",
classes: CodeHighlight_module,
props,
className,
style,
classNames,
styles,
unstyled,
vars,
varsResolver,
rootSelector: "inlineCodeHighlight"
});
return /* @__PURE__ */ jsxRuntime.jsx(CodeHighlight.CodeHighlight, { ...others, ref, ...getStyles("inlineCodeHighlight"), __inline: true });
});
InlineCodeHighlight.displayName = "@mantine/code-highlight/InlineCodeHighlight";
InlineCodeHighlight.classes = CodeHighlight_module;
exports.InlineCodeHighlight = InlineCodeHighlight;
//# sourceMappingURL=InlineCodeHighlight.cjs.map