UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

24 lines 843 B
import * as tslib_1 from "tslib"; import * as React from 'react'; import { PureComponent } from 'react'; import { AkCodeBlock } from '@atlaskit/code'; var identity = function (text) { return text; }; var CodeBlock = (function (_super) { tslib_1.__extends(CodeBlock, _super); function CodeBlock() { return _super !== null && _super.apply(this, arguments) || this; } CodeBlock.prototype.render = function () { var _a = this.props, children = _a.children, language = _a.language; var codeProps = { language: language, text: React.Children.map(children, identity).join('') }; return (React.createElement(AkCodeBlock, tslib_1.__assign({}, codeProps))); }; return CodeBlock; }(PureComponent)); export default CodeBlock; //# sourceMappingURL=codeBlock.js.map