diff --git a/packages/block-editor/src/hooks/index.js b/packages/block-editor/src/hooks/index.js index e3c0a7580aab3..e6227ea2b03e2 100644 --- a/packages/block-editor/src/hooks/index.js +++ b/packages/block-editor/src/hooks/index.js @@ -71,7 +71,7 @@ createBlockSaveFilter( [ export { useCustomSides } from './dimensions'; export { useLayoutClasses, useLayoutStyles } from './layout'; export { getBorderClassesAndStyles, useBorderProps } from './use-border-props'; -export { getShadowClassesAndStyles, useShadowProps } from './use-shadow-props'; +export { getShadowClassesAndStyles } from './use-shadow-props'; export { getColorClassesAndStyles, useColorProps } from './use-color-props'; export { getSpacingClassesAndStyles } from './use-spacing-props'; export { getTypographyClassesAndStyles } from './use-typography-props'; diff --git a/packages/block-editor/src/hooks/index.native.js b/packages/block-editor/src/hooks/index.native.js index 6e4c1c6a17ba5..c7f9df868f2bd 100644 --- a/packages/block-editor/src/hooks/index.native.js +++ b/packages/block-editor/src/hooks/index.native.js @@ -28,7 +28,7 @@ createBlockSaveFilter( [ ] ); export { getBorderClassesAndStyles, useBorderProps } from './use-border-props'; -export { getShadowClassesAndStyles, useShadowProps } from './use-shadow-props'; +export { getShadowClassesAndStyles } from './use-shadow-props'; export { getColorClassesAndStyles, useColorProps } from './use-color-props'; export { getSpacingClassesAndStyles } from './use-spacing-props'; export { useCachedTruthy } from './use-cached-truthy'; diff --git a/packages/block-editor/src/hooks/use-shadow-props.js b/packages/block-editor/src/hooks/use-shadow-props.js index fdc601366245c..34fb8b4546752 100644 --- a/packages/block-editor/src/hooks/use-shadow-props.js +++ b/packages/block-editor/src/hooks/use-shadow-props.js @@ -18,20 +18,6 @@ export function getShadowClassesAndStyles( attributes ) { const shadow = attributes.style?.shadow || ''; return { - className: undefined, style: getInlineStyles( { shadow } ), }; } - -/** - * Derives the shadow related props for a block from its shadow block support - * attributes. - * - * @param {Object} attributes Block attributes. - * - * @return {Object} ClassName & style props from shadow block support. - */ -export function useShadowProps( attributes ) { - const shadowProps = getShadowClassesAndStyles( attributes ); - return shadowProps; -} diff --git a/packages/block-editor/src/index.js b/packages/block-editor/src/index.js index 83475b9358723..10c1fb1077c56 100644 --- a/packages/block-editor/src/index.js +++ b/packages/block-editor/src/index.js @@ -12,7 +12,6 @@ export { getSpacingClassesAndStyles as __experimentalGetSpacingClassesAndStyles, getGapCSSValue as __experimentalGetGapCSSValue, getShadowClassesAndStyles as __experimentalGetShadowClassesAndStyles, - useShadowProps as __experimentalUseShadowProps, useCachedTruthy, } from './hooks'; export * from './components'; diff --git a/packages/block-library/src/button/edit.js b/packages/block-library/src/button/edit.js index 7dffdfb5c1b66..4b32ad0a0ed67 100644 --- a/packages/block-library/src/button/edit.js +++ b/packages/block-library/src/button/edit.js @@ -33,7 +33,7 @@ import { __experimentalUseBorderProps as useBorderProps, __experimentalUseColorProps as useColorProps, __experimentalGetSpacingClassesAndStyles as useSpacingProps, - __experimentalUseShadowProps as useShadowProps, + __experimentalGetShadowClassesAndStyles as useShadowProps, __experimentalLinkControl as LinkControl, __experimentalGetElementClassName, store as blockEditorStore,