From f90810efcd029426ed63340b24d35a7dfa1bfc91 Mon Sep 17 00:00:00 2001 From: Jorge Date: Tue, 12 Feb 2019 20:18:34 +0000 Subject: [PATCH] Do not render font size picker when no font sizes are available and custom font sizes are disabled. --- packages/components/src/font-size-picker/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/components/src/font-size-picker/index.js b/packages/components/src/font-size-picker/index.js index 2e7877cf20613e..79f18faad4947f 100644 --- a/packages/components/src/font-size-picker/index.js +++ b/packages/components/src/font-size-picker/index.js @@ -26,6 +26,9 @@ function FontSizePicker( { value, withSlider = false, } ) { + if ( disableCustomFontSizes && ! fontSizes.length ) { + return null; + } const onChangeValue = ( event ) => { const newValue = event.target.value; if ( newValue === '' ) {