From 64f59925a8fbe425a1bfe82f379e506614139d5d Mon Sep 17 00:00:00 2001 From: ramonjd Date: Wed, 23 Feb 2022 14:46:16 +1100 Subject: [PATCH] Rename variables Adding missing textTransform property for typography --- packages/block-editor/src/hooks/color.js | 4 ++-- packages/block-editor/src/hooks/dimensions.js | 4 ++-- packages/block-editor/src/hooks/typography.js | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/block-editor/src/hooks/color.js b/packages/block-editor/src/hooks/color.js index bb30357f53f33b..18aa20ea77a64f 100644 --- a/packages/block-editor/src/hooks/color.js +++ b/packages/block-editor/src/hooks/color.js @@ -631,7 +631,7 @@ export function getDefaultColorControls( blockType ) { '__experimentalDefaultControls', ] ); - if ( defaultBorderControls === 'all' ) { + if ( defaultColorControls === 'all' ) { return { text: true, background: true, @@ -639,7 +639,7 @@ export function getDefaultColorControls( blockType ) { }; } - return defaultBorderControls; + return defaultColorControls; } const MIGRATION_PATHS = { diff --git a/packages/block-editor/src/hooks/dimensions.js b/packages/block-editor/src/hooks/dimensions.js index 79138c5e6414c8..9aedfe27aa75bd 100644 --- a/packages/block-editor/src/hooks/dimensions.js +++ b/packages/block-editor/src/hooks/dimensions.js @@ -208,7 +208,7 @@ export function getDefaultDimensionsControls( blockType ) { '__experimentalDefaultControls', ] ); - if ( defaultBorderControls === 'all' ) { + if ( defaultDimensionsControls === 'all' ) { return { padding: true, margin: true, @@ -216,5 +216,5 @@ export function getDefaultDimensionsControls( blockType ) { }; } - return defaultBorderControls; + return defaultDimensionsControls; } diff --git a/packages/block-editor/src/hooks/typography.js b/packages/block-editor/src/hooks/typography.js index a0c276500d19b2..4cb43356cd746b 100644 --- a/packages/block-editor/src/hooks/typography.js +++ b/packages/block-editor/src/hooks/typography.js @@ -262,16 +262,17 @@ export function getDefaultTypographyControls( blockType ) { '__experimentalDefaultControls', ] ); - if ( defaultBorderControls === 'all' ) { + if ( defaultTypographyControls === 'all' ) { return { fontFamily: true, fontSize: true, fontAppearance: true, lineHeight: true, textDecoration: true, + textTransform: true, letterSpacing: true, }; } - return defaultBorderControls; + return defaultTypographyControls; }