@secretstache/wordpress-gutenberg 0.7.0 → 0.7.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secretstache/wordpress-gutenberg",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "",
5
5
  "author": "Secret Stache",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,7 +27,7 @@ export const ImageRenderer = ({
27
27
  <Button
28
28
  className="bc-remove-btn"
29
29
  onClick={onRemoveClick}
30
- isSecondary
30
+ variant="secondary"
31
31
  isDestructive
32
32
  >
33
33
  {removeButtonLabel}
@@ -61,7 +61,7 @@ export const VideoRenderer = ({
61
61
  <Button
62
62
  className="bc-remove-btn"
63
63
  onClick={onRemoveClick}
64
- isSecondary
64
+ variant="secondary"
65
65
  isDestructive
66
66
  >
67
67
  {removeButtonLabel}
@@ -158,16 +158,15 @@ export const MediaControl = ({
158
158
 
159
159
  {
160
160
  hasFocalPoint && mediaId && mediaUrl && (
161
- <BaseControl label={focalPointLabel}>
162
- <FocalPointPicker
163
- __nextHasNoMarginBottom
164
- url={mediaUrl}
165
- value={focalPoint}
166
- onDragStart={onFocalPointChange}
167
- onDrag={onFocalPointChange}
168
- onChange={onFocalPointChange}
169
- />
170
- </BaseControl>
161
+ <FocalPointPicker
162
+ __nextHasNoMarginBottom
163
+ label={focalPointLabel}
164
+ url={mediaUrl}
165
+ value={focalPoint}
166
+ onDragStart={onFocalPointChange}
167
+ onDrag={onFocalPointChange}
168
+ onChange={onFocalPointChange}
169
+ />
171
170
  )
172
171
  }
173
172
  </>
@@ -36,7 +36,7 @@ export const MediaWithFocalPointControl = memo(({
36
36
 
37
37
  [focalPointAttributeName]: { x: 0.5, y: 0.5 }
38
38
  });
39
- }, [ mediaAttributeName ]);
39
+ }, [ mediaAttributeName, focalPointAttributeName ]);
40
40
 
41
41
  const onMediaRemove = useCallback(() => {
42
42
  setAttributes({
@@ -62,16 +62,15 @@ export const MediaWithFocalPointControl = memo(({
62
62
  </BaseControl>
63
63
 
64
64
  {media?.url && (
65
- <BaseControl label={focalPointLabel}>
66
- <FocalPointPicker
67
- __nextHasNoMarginBottom
68
- url={media.url}
69
- value={focalPoint}
70
- onDragStart={onFocalPointChange}
71
- onDrag={onFocalPointChange}
72
- onChange={onFocalPointChange}
73
- />
74
- </BaseControl>
65
+ <FocalPointPicker
66
+ __nextHasNoMarginBottom
67
+ label={focalPointLabel}
68
+ url={media.url}
69
+ value={focalPoint}
70
+ onDragStart={onFocalPointChange}
71
+ onDrag={onFocalPointChange}
72
+ onChange={onFocalPointChange}
73
+ />
75
74
  )}
76
75
  </>
77
76
  );
@@ -13,7 +13,6 @@ export * from './MediaTypeControl.jsx';
13
13
  export * from './InsertBlockToolbar.jsx';
14
14
  export * from './PreviewControl.jsx';
15
15
  export * from './MediaWithFocalPointControl.jsx';
16
- export * from './MediaWithFocalPointControl.jsx';
17
16
  export * from './EmptyBlockPlaceholder.jsx';
18
17
  export * from './PatternAppender.jsx';
19
18
  export * from './PatternsModal.jsx';