Skip to content

Commit

Permalink
Fixed import and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Oct 20, 2022
1 parent 27aa03e commit 1b8469c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
1 change: 0 additions & 1 deletion packages/components/src/font-size-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import {
ResetButton,
} from './styles';
import { Spacer } from '../spacer';
import { FontSizeOption } from './types';

// This conditional is needed to maintain the spacing before the slider in the `withSlider` case.
const MaybeVStack = ( {
Expand Down
23 changes: 10 additions & 13 deletions packages/edit-site/src/components/global-styles/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,20 @@ export function useStyle( path, blockName, source = 'all' ) {
// Deep clone `currentConfig` to avoid mutating it later.
const newUserConfig = JSON.parse( JSON.stringify( currentConfig ) );
let styleValue = getPresetVariableFromValue(
mergedConfig.settings,
blockName,
path,
newValue
);
mergedConfig.settings,
blockName,
path,
newValue
);
// Convert font size styles to fluid if fluid is activated.
if ( finalPath.indexOf( 'typography.fontSize' ) !== -1 && !! metadata?.slug ) {
if (
finalPath.indexOf( 'typography.fontSize' ) !== -1 &&
!! metadata?.slug
) {
styleValue = `var:preset|font-size|${ metadata?.slug })`;
}



set(
newUserConfig,
finalPath,
styleValue
);
set( newUserConfig, finalPath, styleValue );
return newUserConfig;
} );
};
Expand Down

0 comments on commit 1b8469c

Please sign in to comment.