UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

21 lines 1.42 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { PureComponent } from 'react'; import styled from 'styled-components'; import { float, clear, textAlign } from '../../plugins/media/single-image'; // tslint:disable-next-line:variable-name var Wrapper = (_a = ["\n padding-bottom: 8px;\n display: block;\n float: ", ";\n clear: ", ";\n text-align: ", ";\n\n & > * {\n padding: 5px 10px 0 0;\n }\n"], _a.raw = ["\n padding-bottom: 8px;\n display: block;\n float: ", ";\n clear: ", ";\n text-align: ", ";\n\n & > * {\n padding: 5px 10px 0 0;\n }\n"], styled.div(_a, function (props) { return float(props['data-alignment'], props['data-display']); }, function (props) { return clear(props['data-alignment'], props['data-display']); }, function (props) { return textAlign(props['data-alignment'], props['data-display']); })); var SingleImageNode = (function (_super) { tslib_1.__extends(SingleImageNode, _super); function SingleImageNode(props) { return _super.call(this, props) || this; } SingleImageNode.prototype.render = function () { var node = this.props.node; return (React.createElement(Wrapper, { "data-alignment": node.attrs.alignment, "data-display": node.attrs.display }, this.props.children)); }; return SingleImageNode; }(PureComponent)); export default SingleImageNode; var _a; //# sourceMappingURL=single-image.js.map