@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
25 lines • 1.52 kB
JavaScript
import * as tslib_1 from "tslib";
import * as React from 'react';
import { Component } from 'react';
import { toolbarSize } from '../styles';
import { CornerContainer, CornerButton, } from './styles';
import InsertColumnButton from '../ColumnControls/InsertColumnButton';
import InsertRowButton from '../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(CornerContainer, { className: this.props.isSelected() ? 'active' : '' },
React.createElement(CornerButton, { onClick: this.props.selectTable, onMouseOver: this.props.onMouseOver, onMouseOut: this.props.onMouseOut }),
React.createElement(InsertColumnButton, { style: { right: -toolbarSize, top: -toolbarSize - 8 }, index: 0, insertColumn: this.props.insertColumn, lineMarkerHeight: tableHeight + toolbarSize }),
React.createElement(InsertRowButton, { style: { bottom: -toolbarSize, left: -toolbarSize - 8 }, index: 0, insertRow: this.props.insertRow, lineMarkerWidth: tableWidth + toolbarSize })));
};
return CornerControls;
}(Component));
export default CornerControls;
//# sourceMappingURL=index.js.map