@automattic/jetpack-components 0.51.0 → 0.52.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 CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [0.52.0] - 2024-04-11
6
+ ### Added
7
+ - Added connected card to the A4A plugin. [#36747]
8
+ - Jetpack Components: add a new prop for custom classes for the ActionButton component [#36771]
9
+
5
10
  ## [0.51.0] - 2024-04-08
6
11
  ### Added
7
12
  - Added AutomatticIconLogo and AutomatticForAgenciesLogo components. [#36664]
@@ -1003,6 +1008,7 @@
1003
1008
  ### Changed
1004
1009
  - Update node version requirement to 14.16.1
1005
1010
 
1011
+ [0.52.0]: https://github.com/Automattic/jetpack-components/compare/0.51.0...0.52.0
1006
1012
  [0.51.0]: https://github.com/Automattic/jetpack-components/compare/0.50.5...0.51.0
1007
1013
  [0.50.5]: https://github.com/Automattic/jetpack-components/compare/0.50.4...0.50.5
1008
1014
  [0.50.4]: https://github.com/Automattic/jetpack-components/compare/0.50.3...0.50.4
@@ -23,19 +23,30 @@ import styles from './style.module.scss';
23
23
  * @returns {React.Component} The `ActionButton` component.
24
24
  */
25
25
  const ActionButton = props => {
26
- const { label, onClick, isLoading, isDisabled, displayError, errorMessage } = props;
26
+ const {
27
+ label,
28
+ onClick,
29
+ isLoading,
30
+ loadingText,
31
+ isDisabled,
32
+ displayError,
33
+ errorMessage,
34
+ customClass,
35
+ } = props;
36
+
37
+ const loadingContent = loadingText || <Spinner />;
27
38
 
28
39
  return (
29
40
  <>
30
41
  {
31
42
  <Button
32
- className={ classNames( styles.button, 'jp-action-button--button' ) }
43
+ className={ classNames( styles.button, 'jp-action-button--button', customClass ) }
33
44
  label={ label }
34
45
  onClick={ onClick }
35
46
  variant="primary"
36
47
  disabled={ isLoading || isDisabled }
37
48
  >
38
- { isLoading ? <Spinner /> : label }
49
+ { isLoading ? loadingContent : label }
39
50
  </Button>
40
51
  }
41
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.51.0",
3
+ "version": "0.52.0",
4
4
  "description": "Jetpack Components Package",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",
@@ -34,7 +34,7 @@
34
34
  "uplot-react": "1.1.4"
35
35
  },
36
36
  "devDependencies": {
37
- "@automattic/jetpack-base-styles": "^0.6.21",
37
+ "@automattic/jetpack-base-styles": "^0.6.22",
38
38
  "@babel/core": "7.24.0",
39
39
  "@babel/preset-react": "7.23.3",
40
40
  "@jest/globals": "29.4.3",