UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

27 lines 1.68 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = require("react"); var react_1 = require("react"); var styles_1 = require("../styles"); var styles_2 = require("./styles"); var InsertColumnButton_1 = require("../ColumnControls/InsertColumnButton"); var InsertRowButton_1 = require("../RowControls/InsertRowButton"); var CornerControls = (function (_super) { tslib_1.__extends(CornerControls, _super); function CornerControls() { return _super !== null && _super.apply(this, arguments) || this; } CornerControls.prototype.render = function () { var tableElement = this.props.tableElement; var tableWidth = tableElement.offsetWidth; var tableHeight = tableElement.offsetHeight; return (React.createElement(styles_2.CornerContainer, { className: this.props.isSelected() ? 'active' : '' }, React.createElement(styles_2.CornerButton, { onClick: this.props.selectTable, onMouseOver: this.props.onMouseOver, onMouseOut: this.props.onMouseOut }), React.createElement(InsertColumnButton_1.default, { style: { right: -styles_1.toolbarSize, top: -styles_1.toolbarSize - 8 }, index: 0, insertColumn: this.props.insertColumn, lineMarkerHeight: tableHeight + styles_1.toolbarSize }), React.createElement(InsertRowButton_1.default, { style: { bottom: -styles_1.toolbarSize, left: -styles_1.toolbarSize - 8 }, index: 0, insertRow: this.props.insertRow, lineMarkerWidth: tableWidth + styles_1.toolbarSize }))); }; return CornerControls; }(react_1.Component)); exports.default = CornerControls; //# sourceMappingURL=index.js.map