Skip to content
Merged
Prev Previous commit
Next Next commit
Update imports in block files
  • Loading branch information
Gerardo committed Apr 25, 2024
commit 8b09d84f37e666f3e882deb39a15b34a3d4f36af
2 changes: 1 addition & 1 deletion packages/block-library/src/audio/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {
ToggleControl,
ToolbarButton,
ToolbarGroup,
AudioPlayer,
} from '@wordpress/components';
import {
AudioPlayer,
BlockCaption,
BlockControls,
BlockIcon,
Expand Down
3 changes: 2 additions & 1 deletion packages/block-library/src/block/edit-title.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { Text, View } from 'react-native';
/**
* WordPress dependencies
*/
import { Icon, useGlobalStyles } from '@wordpress/components';
import { Icon } from '@wordpress/components';
import { useGlobalStyles } from '@wordpress/block-editor';
import { __ } from '@wordpress/i18n';
import { withPreferredColorScheme } from '@wordpress/compose';
import { help, lock } from '@wordpress/icons';
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/button/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
getColorObjectByAttributeValues,
getGradientValueBySlug,
__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,
useMobileGlobalStylesColors,
} from '@wordpress/block-editor';
import {
PanelBody,
Expand All @@ -28,7 +29,6 @@ import {
BottomSheetSelectControl,
CSS_UNITS,
filterUnitsWithSettings,
useMobileGlobalStylesColors,
} from '@wordpress/components';
import { link } from '@wordpress/icons';
// eslint-disable-next-line no-restricted-imports
Expand Down
5 changes: 2 additions & 3 deletions packages/block-library/src/columns/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
FooterMessageControl,
UnitControl,
getValueAndUnit,
GlobalStylesContext,
alignmentHelpers,
__experimentalUseCustomUnits as useCustomUnits,
} from '@wordpress/components';
Expand All @@ -25,12 +24,12 @@ import {
BlockVariationPicker,
useSettings,
store as blockEditorStore,
useGlobalStyles,
} from '@wordpress/block-editor';
import { withDispatch, useSelect } from '@wordpress/data';
import {
useEffect,
useState,
useContext,
useMemo,
useCallback,
memo,
Expand Down Expand Up @@ -90,7 +89,7 @@ function ColumnsEditContainer( {
const [ resizeListener, sizes ] = useResizeObserver();
const [ columnsInRow, setColumnsInRow ] = useState( MIN_COLUMNS_NUM );
const screenWidth = Math.floor( Dimensions.get( 'window' ).width );
const globalStyles = useContext( GlobalStylesContext );
const globalStyles = useGlobalStyles();

const { verticalAlignment, align } = attributes;
const { width } = sizes || {};
Expand Down
7 changes: 5 additions & 2 deletions packages/block-library/src/cover/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
ColorPicker,
BottomSheetConsumer,
useConvertUnitToMobile,
useMobileGlobalStylesColors,
} from '@wordpress/components';
import {
BlockControls,
Expand All @@ -47,6 +46,8 @@ import {
getColorObjectByAttributeValues,
getGradientValueBySlug,
store as blockEditorStore,
useGlobalStyles,
useMobileGlobalStylesColors,
} from '@wordpress/block-editor';
import { compose, withPreferredColorScheme } from '@wordpress/compose';
import { useDispatch, withSelect, withDispatch } from '@wordpress/data';
Expand Down Expand Up @@ -156,9 +157,11 @@ const Cover = ( {
mediaUploadSync();
}, [] );

const globalStyles = useGlobalStyles();
const convertedMinHeight = useConvertUnitToMobile(
minHeight || COVER_DEFAULT_HEIGHT,
minHeightUnit
minHeightUnit,
globalStyles
);

const isImage = backgroundType === MEDIA_TYPE_IMAGE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {
getGradientValueBySlug,
getGradientSlugByValue,
__experimentalPanelColorGradientSettings as PanelColorGradientSettings,
useMobileGlobalStylesColors,
} from '@wordpress/block-editor';
import { useMemo } from '@wordpress/element';
import { useMobileGlobalStylesColors } from '@wordpress/components';

function OverlayColorSettings( {
overlayColor,
Expand Down