UNPKG

@mantine/code-highlight

Version:

Code highlight with Mantine theme

27 lines (23 loc) 809 B
'use client'; 'use strict'; var jsxRuntime = require('react/jsx-runtime'); var CodeHighlightControl = require('../CodeHighlightControl/CodeHighlightControl.cjs'); var ExpandIcon = require('./ExpandIcon.cjs'); function ExpandCodeButton({ expanded, onExpand, expandCodeLabel = "Expand code", collapseCodeLabel = "Collapse code" }) { return /* @__PURE__ */ jsxRuntime.jsx( CodeHighlightControl.CodeHighlightControl, { onClick: () => onExpand(!expanded), tooltipLabel: expanded ? collapseCodeLabel : expandCodeLabel, children: /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon.ExpandIcon, { expanded }) } ); } ExpandCodeButton.displayName = "@mantine/code-highlight/ExpandCodeButton"; exports.ExpandCodeButton = ExpandCodeButton; //# sourceMappingURL=ExpandCodeButton.cjs.map