1 line
3.1 KiB
JSON
1 line
3.1 KiB
JSON
{"ast":null,"code":"var _this = this,\n _jsxFileName = \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/src/components/CodeHighlight.js\";\n\nimport React, { useEffect, useRef } from 'react';\nimport Prism from 'prismjs/components/prism-core';\nimport 'prismjs/components/prism-clike';\nimport 'prismjs/components/prism-markup';\nimport 'prismjs/components/prism-jsx';\nimport 'prismjs/components/prism-javascript';\nimport 'prismjs/components/prism-css';\nimport 'prismjs/components/prism-scss';\nexport var CodeHighlight = function CodeHighlight(props) {\n var codeElement = useRef(null);\n useEffect(function () {\n if (Prism) {\n Prism.highlightElement(codeElement.current);\n }\n }, []);\n return /*#__PURE__*/React.createElement(\"pre\", {\n style: props.style,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 9\n }\n }, /*#__PURE__*/React.createElement(\"code\", {\n ref: codeElement,\n className: \"language-\".concat(props.lang),\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 13\n }\n }, props.children, \"\\xA0\"));\n};\nCodeHighlight.defaultProps = {\n lang: 'jsx',\n style: null\n};","map":{"version":3,"names":["React","useEffect","useRef","Prism","CodeHighlight","props","codeElement","highlightElement","current","style","lang","children","defaultProps"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/src/components/CodeHighlight.js"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport Prism from 'prismjs/components/prism-core';\nimport 'prismjs/components/prism-clike';\nimport 'prismjs/components/prism-markup';\nimport 'prismjs/components/prism-jsx';\nimport 'prismjs/components/prism-javascript';\nimport 'prismjs/components/prism-css';\nimport 'prismjs/components/prism-scss';\n\nexport const CodeHighlight = (props) => {\n\n const codeElement = useRef(null);\n\n useEffect(() => {\n if (Prism) {\n Prism.highlightElement(codeElement.current);\n }\n }, []);\n\n return (\n <pre style={props.style}>\n <code ref={codeElement} className={`language-${props.lang}`}>\n {props.children} \n </code>\n </pre>\n );\n}\n\nCodeHighlight.defaultProps = {\n lang: 'jsx',\n style: null\n};\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,MAA3B,QAAyC,OAAzC;AACA,OAAOC,KAAP,MAAkB,+BAAlB;AACA,OAAO,gCAAP;AACA,OAAO,iCAAP;AACA,OAAO,8BAAP;AACA,OAAO,qCAAP;AACA,OAAO,8BAAP;AACA,OAAO,+BAAP;AAEA,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAW;EAEpC,IAAMC,WAAW,GAAGJ,MAAM,CAAC,IAAD,CAA1B;EAEAD,SAAS,CAAC,YAAM;IACZ,IAAIE,KAAJ,EAAW;MACPA,KAAK,CAACI,gBAAN,CAAuBD,WAAW,CAACE,OAAnC;IACH;EACJ,CAJQ,EAIN,EAJM,CAAT;EAMA,oBACI;IAAK,KAAK,EAAEH,KAAK,CAACI,KAAlB;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,gBACI;IAAM,GAAG,EAAEH,WAAX;IAAwB,SAAS,qBAAcD,KAAK,CAACK,IAApB,CAAjC;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,GACKL,KAAK,CAACM,QADX,SADJ,CADJ;AAOH,CAjBM;AAmBPP,aAAa,CAACQ,YAAd,GAA6B;EACzBF,IAAI,EAAE,KADmB;EAEzBD,KAAK,EAAE;AAFkB,CAA7B"},"metadata":{},"sourceType":"module"} |