Skip to content

Commit

Permalink
Add constants file to Spacer block (#40446)
Browse files Browse the repository at this point in the history
  • Loading branch information
fluiddot authored Apr 20, 2022
1 parent 00cb38c commit 69734b1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/block-library/src/spacer/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const MIN_SPACER_SIZE = 0;
2 changes: 1 addition & 1 deletion packages/block-library/src/spacer/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { useInstanceId } from '@wordpress/compose';
/**
* Internal dependencies
*/
import { MIN_SPACER_SIZE } from './edit';
import { MIN_SPACER_SIZE } from './constants';

function DimensionInput( { label, onChange, isResizing, value = '' } ) {
const inputId = useInstanceId( UnitControl, 'block-spacer-height-input' );
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/spacer/controls.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { MIN_SPACER_SIZE } from './edit.js';
import { MIN_SPACER_SIZE } from './constants';
import styles from './style.scss';

const DEFAULT_VALUES = { px: 100, em: 10, rem: 10, vw: 10, vh: 25 };
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/spacer/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import { View } from '@wordpress/primitives';
* Internal dependencies
*/
import SpacerControls from './controls';

export const MIN_SPACER_SIZE = 0;
import { MIN_SPACER_SIZE } from './constants';

const ResizableSpacer = ( {
orientation,
Expand Down

0 comments on commit 69734b1

Please sign in to comment.