1 | import * as React from 'react';
|
2 |
|
3 | function AddButton(_ref, ref) {
|
4 | var prefixCls = _ref.prefixCls,
|
5 | editable = _ref.editable,
|
6 | locale = _ref.locale,
|
7 | style = _ref.style;
|
8 |
|
9 | if (!editable || editable.showAdd === false) {
|
10 | return null;
|
11 | }
|
12 |
|
13 | return React.createElement("button", {
|
14 | ref: ref,
|
15 | type: "button",
|
16 | className: "".concat(prefixCls, "-nav-add"),
|
17 | style: style,
|
18 | "aria-label": (locale === null || locale === void 0 ? void 0 : locale.addAriaLabel) || 'Add tab',
|
19 | onClick: function onClick(event) {
|
20 | editable.onEdit('add', {
|
21 | event: event
|
22 | });
|
23 | }
|
24 | }, editable.addIcon || '+');
|
25 | }
|
26 |
|
27 | export default React.forwardRef(AddButton); |
\ | No newline at end of file |