diff --git a/packages/commons/src/Blocks.jsx b/packages/commons/src/Blocks.jsx index c1e01342e..6983bf7ff 100644 --- a/packages/commons/src/Blocks.jsx +++ b/packages/commons/src/Blocks.jsx @@ -10,7 +10,7 @@ import { __experimentalText as Text, __experimentalScrollable as Scrollable } from '@wordpress/components'; -import { Component } from '@wordpress/element'; +import { Component, createRef } from '@wordpress/element'; import apiFetch from '@wordpress/api-fetch'; import { togglePanel } from "./Util"; @@ -50,7 +50,7 @@ export class ComponentWithSettings extends Component { } } }, false); - this.iframe = React.createRef(); + this.iframe = createRef(); this.unsubscribe = wp.data.subscribe(() => { const newPreviewMode = wp.data.select("core/editor").getDeviceType(); if (newPreviewMode !== this.state.previewMode) { diff --git a/packages/commons/src/Format.jsx b/packages/commons/src/Format.jsx index e76eda7f4..85660d09e 100644 --- a/packages/commons/src/Format.jsx +++ b/packages/commons/src/Format.jsx @@ -341,7 +341,8 @@ export const Format = ({ onUseCustomAxisFormatChange, customFormat, hiddenCustomAxisFormat, - useCustomAxisFormat + useCustomAxisFormat, + showPrefixSuffix = false }) => { @@ -398,7 +399,7 @@ export const Format = ({ value={format.minimumFractionDigits} /> - + {showPrefixSuffix && { @@ -406,8 +407,8 @@ export const Format = ({ }} value={format.prefix} /> - - + } + {showPrefixSuffix && { @@ -415,7 +416,7 @@ export const Format = ({ }} value={format.suffix} /> - + } , <> {!hiddenCustomAxisFormat && setAttributes({ iconUp: media.url })} allowedTypes={["image"]} - value={iconImage} + value={iconUp} render={({ open }) => (