@gravity-ui/page-constructor 2.19.0-alpha.0 → 2.19.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
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.19.0](https://github.com/gravity-ui/page-constructor/compare/v2.18.0...v2.19.0) (2023-05-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * **Button:** add prop width ([#346](https://github.com/gravity-ui/page-constructor/issues/346)) ([f4b1ba8](https://github.com/gravity-ui/page-constructor/commit/f4b1ba85f56ef2de435bd91ae1fc35fbea0a177b))
9
+
3
10
  ## [2.18.0](https://github.com/gravity-ui/page-constructor/compare/v2.18.0...v2.18.0) (2023-05-15)
4
11
 
5
12
 
@@ -25,12 +25,13 @@ const Button = (props) => {
25
25
  onClickOrigin(e);
26
26
  }
27
27
  }, [handleMetrika, metrikaGoals, pixelEvents, handleAnalytics, analyticsEvents, onClickOrigin]);
28
+ const buttonModifiers = { size, theme, width };
28
29
  const buttonImg = img instanceof Object
29
30
  ? { url: img.url, position: img.position || defaultImgPosition, alt: img.alt }
30
31
  : { url: img, position: defaultImgPosition };
31
32
  const buttonClass = img
32
- ? b({ position: buttonImg.position, size, theme, width }, className)
33
- : b({ size, theme, width }, className);
33
+ ? b(Object.assign({ position: buttonImg.position }, buttonModifiers), className)
34
+ : b(Object.assign({}, buttonModifiers), className);
34
35
  const buttonProps = Object.assign(Object.assign({}, rest), { onClick });
35
36
  if (theme === 'app-store' || theme === 'google-play') {
36
37
  const platform = theme === 'app-store' ? uikit_1.Platform.IOS : uikit_1.Platform.ANDROID;
@@ -24,12 +24,13 @@ const Button = (props) => {
24
24
  onClickOrigin(e);
25
25
  }
26
26
  }, [handleMetrika, metrikaGoals, pixelEvents, handleAnalytics, analyticsEvents, onClickOrigin]);
27
+ const buttonModifiers = { size, theme, width };
27
28
  const buttonImg = img instanceof Object
28
29
  ? { url: img.url, position: img.position || defaultImgPosition, alt: img.alt }
29
30
  : { url: img, position: defaultImgPosition };
30
31
  const buttonClass = img
31
- ? b({ position: buttonImg.position, size, theme, width }, className)
32
- : b({ size, theme, width }, className);
32
+ ? b(Object.assign({ position: buttonImg.position }, buttonModifiers), className)
33
+ : b(Object.assign({}, buttonModifiers), className);
33
34
  const buttonProps = Object.assign(Object.assign({}, rest), { onClick });
34
35
  if (theme === 'app-store' || theme === 'google-play') {
35
36
  const platform = theme === 'app-store' ? Platform.IOS : Platform.ANDROID;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "2.19.0-alpha.0",
3
+ "version": "2.19.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -138,8 +138,5 @@
138
138
  "*.{json,yaml,yml,md}": [
139
139
  "prettier --write"
140
140
  ]
141
- },
142
- "publishConfig": {
143
- "tag": "alpha"
144
141
  }
145
142
  }