Skip to content

Commit

Permalink
fix default units
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Jul 19, 2021
1 parent 192b74c commit c40bd8f
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -41,8 +41,9 @@ const DimensionControls = ( {
attributes: { width, height, scale },
setAttributes,
} ) => {
const defaultUnits = [ 'px', '%', 'vw', 'em', 'rem' ];
const units = useCustomUnits( {
availableUnits: useSetting( 'spacing.units' ) || [ 'px', 'em', 'rem' ],
availableUnits: useSetting( 'spacing.units' ) || defaultUnits,
} );
const onDimensionChange = ( dimension, nextValue ) => {
const parsedValue = parseFloat( nextValue );
Expand Down

0 comments on commit c40bd8f

Please sign in to comment.