Inside a component. I only see the html for highlight.js hljs
as a child prop. How would I get the raw code so I can build a copy code to clipboard button? Thanks.
In styleguide.config.js:
styleguideComponents: {
Code: path.join(__dirname, "../src/theme/Code")
}
In src/theme/Code.js:
if (isHighlighted) {
return [
React.createElement("div", { className: "TEST" }, children),
React.createElement("code", { className: classNames }, children)
];
}