UNPKG

@mantine/code-highlight

Version:

Code highlight with Mantine theme

18 lines (17 loc) 858 B
"use client"; import { CodeHighlightControl } from "../CodeHighlightControl/CodeHighlightControl.mjs"; import { ExpandIcon } from "./ExpandIcon.mjs"; import { jsx } from "react/jsx-runtime"; //#region packages/@mantine/code-highlight/src/CodeHighlight/ExpandCodeButton/ExpandCodeButton.tsx function ExpandCodeButton({ expanded, onExpand, expandCodeLabel = "Expand code", collapseCodeLabel = "Collapse code" }) { return /* @__PURE__ */ jsx(CodeHighlightControl, { onClick: () => onExpand(!expanded), tooltipLabel: expanded ? collapseCodeLabel : expandCodeLabel, "aria-label": expanded ? collapseCodeLabel : expandCodeLabel, children: /* @__PURE__ */ jsx(ExpandIcon, { expanded }) }); } ExpandCodeButton.displayName = "@mantine/code-highlight/ExpandCodeButton"; //#endregion export { ExpandCodeButton }; //# sourceMappingURL=ExpandCodeButton.mjs.map