@atlaskit/button 18.0.2 → 18.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/new-button/variants/shared/icon-renderer.js +1 -2
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/new-button/variants/shared/icon-renderer.js +1 -2
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/new-button/variants/shared/icon-renderer.js +1 -2
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 18.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`aa0094627549a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/aa0094627549a) -
|
|
8
|
+
Removed feature flag for render prop fix introduced in 17.22.0.
|
|
9
|
+
|
|
3
10
|
## 18.0.2
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
9
|
function isIconRenderProp(func) {
|
|
11
10
|
return !func.displayName &&
|
|
12
11
|
// most function components and class components have a displayName, negate them
|
|
@@ -25,7 +24,7 @@ function isIconRenderProp(func) {
|
|
|
25
24
|
var IconRenderer = function IconRenderer(_ref) {
|
|
26
25
|
var Icon = _ref.icon,
|
|
27
26
|
size = _ref.size;
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isIconRenderProp(Icon) ? Icon({
|
|
29
28
|
label: '',
|
|
30
29
|
size: size,
|
|
31
30
|
color: 'currentColor'
|
|
@@ -133,7 +133,7 @@ var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
133
133
|
action: 'clicked',
|
|
134
134
|
componentName: 'button',
|
|
135
135
|
packageName: "@atlaskit/button",
|
|
136
|
-
packageVersion: "18.0
|
|
136
|
+
packageVersion: "18.1.0",
|
|
137
137
|
analyticsData: analyticsContext
|
|
138
138
|
});
|
|
139
139
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
function isIconRenderProp(func) {
|
|
4
3
|
return !func.displayName &&
|
|
5
4
|
// most function components and class components have a displayName, negate them
|
|
@@ -19,7 +18,7 @@ const IconRenderer = ({
|
|
|
19
18
|
icon: Icon,
|
|
20
19
|
size
|
|
21
20
|
}) => {
|
|
22
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
21
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isIconRenderProp(Icon) ? Icon({
|
|
23
22
|
label: '',
|
|
24
23
|
size: size,
|
|
25
24
|
color: 'currentColor'
|
|
@@ -119,7 +119,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
119
119
|
action: 'clicked',
|
|
120
120
|
componentName: 'button',
|
|
121
121
|
packageName: "@atlaskit/button",
|
|
122
|
-
packageVersion: "18.0
|
|
122
|
+
packageVersion: "18.1.0",
|
|
123
123
|
analyticsData: analyticsContext
|
|
124
124
|
});
|
|
125
125
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
function isIconRenderProp(func) {
|
|
4
3
|
return !func.displayName &&
|
|
5
4
|
// most function components and class components have a displayName, negate them
|
|
@@ -18,7 +17,7 @@ function isIconRenderProp(func) {
|
|
|
18
17
|
var IconRenderer = function IconRenderer(_ref) {
|
|
19
18
|
var Icon = _ref.icon,
|
|
20
19
|
size = _ref.size;
|
|
21
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isIconRenderProp(Icon) ? Icon({
|
|
22
21
|
label: '',
|
|
23
22
|
size: size,
|
|
24
23
|
color: 'currentColor'
|
|
@@ -125,7 +125,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
125
125
|
action: 'clicked',
|
|
126
126
|
componentName: 'button',
|
|
127
127
|
packageName: "@atlaskit/button",
|
|
128
|
-
packageVersion: "18.0
|
|
128
|
+
packageVersion: "18.1.0",
|
|
129
129
|
analyticsData: analyticsContext
|
|
130
130
|
});
|
|
131
131
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "18.0
|
|
3
|
+
"version": "18.1.0",
|
|
4
4
|
"description": "A button triggers an event or action. They let users know what will happen next.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -206,9 +206,6 @@
|
|
|
206
206
|
},
|
|
207
207
|
"platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw": {
|
|
208
208
|
"type": "boolean"
|
|
209
|
-
},
|
|
210
|
-
"platform.design-system-team.button-render-prop-fix_lyo55": {
|
|
211
|
-
"type": "boolean"
|
|
212
209
|
}
|
|
213
210
|
}
|
|
214
211
|
}
|