@mantine/code-highlight
Version:
Code highlight with Mantine theme
25 lines (22 loc) • 720 B
JavaScript
'use client';
import { jsx } from 'react/jsx-runtime';
import { CodeHighlightControl } from '../CodeHighlightControl/CodeHighlightControl.mjs';
import { ExpandIcon } from './ExpandIcon.mjs';
function ExpandCodeButton({
expanded,
onExpand,
expandCodeLabel = "Expand code",
collapseCodeLabel = "Collapse code"
}) {
return /* @__PURE__ */ jsx(
CodeHighlightControl,
{
onClick: () => onExpand(!expanded),
tooltipLabel: expanded ? collapseCodeLabel : expandCodeLabel,
children: /* @__PURE__ */ jsx(ExpandIcon, { expanded })
}
);
}
ExpandCodeButton.displayName = "@mantine/code-highlight/ExpandCodeButton";
export { ExpandCodeButton };
//# sourceMappingURL=ExpandCodeButton.mjs.map