@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
24 lines • 1.29 kB
JavaScript
import * as tslib_1 from "tslib";
import * as React from 'react';
import { Component } from 'react';
import AddIcon from '@atlaskit/icon/glyph/editor/add';
import AkButton from '@atlaskit/button';
import { InsertRowButtonWrap, InsertRowMarker, InsertRowButtonInner, RowLineMarker, } from './styles';
var InsertRowButton = (function (_super) {
tslib_1.__extends(InsertRowButton, _super);
function InsertRowButton() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.handleInsert = function () { return _this.props.insertRow(_this.props.index); };
return _this;
}
InsertRowButton.prototype.render = function () {
return (React.createElement(InsertRowButtonWrap, { style: this.props.style },
React.createElement(InsertRowButtonInner, null,
React.createElement(AkButton, { onClick: this.handleInsert, iconBefore: React.createElement(AddIcon, { label: "Add row" }), appearance: "primary", spacing: "none" })),
React.createElement(RowLineMarker, { style: { width: this.props.lineMarkerWidth } }),
React.createElement(InsertRowMarker, null)));
};
return InsertRowButton;
}(Component));
export default InsertRowButton;
//# sourceMappingURL=InsertRowButton.js.map