@hocgin/gin-editor
Version:
@hocgin/gin-editor
50 lines (40 loc) • 2.15 kB
JavaScript
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
import React, { Component } from 'react';
import 'braft-extensions/dist/code-highlighter.css';
import styles from "./index.css";
var Index = /*#__PURE__*/function (_Component) {
_inherits(Index, _Component);
var _super = _createSuper(Index);
function Index(props, context) {
_classCallCheck(this, Index);
return _super.call(this, props, context);
}
_createClass(Index, [{
key: "componentDidMount",
value: function componentDidMount() {}
}, {
key: "render",
value: function render() {
var children = this.props.children;
return /*#__PURE__*/React.createElement("div", {
className: styles.richPreview
}, /*#__PURE__*/React.createElement("div", {
dangerouslySetInnerHTML: {
__html: "".concat(children)
}
}));
}
}]);
return Index;
}(Component);
Index.defaultProps = {
children: ''
};
export default Index;